0.0.1 • Published 3 months ago

bys-container-ui v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

BYS-CONTAINER

Bu uygulamada BYS projesi için gerekli olan tüm bileşenlerin bir arada bulunduğu bir yapı oluşturulmuş ve gerekli araçlar kullanılarak modüllere aktarılmaları için konfigürasyonları yapılmıştır.

Node & NPM Versiyonları

  • minimum node version: 16.0.0 (iyi çalışan versiyon: 18.10.0)
  • minimum npm version: 7.0.0 npm i -g npm
  • minimum typescript version: 4.5.2 npm i -g typescript
  • minimum eslint version: 7.32.0 (for eslint-config-airbnb-typescript) npm i -g eslint
  • minimum prettier version: 2.4.1 npm i -g prettier

VSCODE'a Eklenmesi Gereken Eklentiler

Projenin Çalıştırılması

  1. Clone the repo
  git clone https://gitlab.com/idvlabs/bys/bys-container.git
  1. Install NPM packages
  cd bys-container
  npm install
  1. Set .env.development file for development environment
  REACT_APP_BASE_SERVICE_URL = YOUR_SERVICE_URL
  REACT_APP_ACCESS_TOKEN_KEY = YOUR_ACCESS_TOKEN_KEY
  REACT_APP_ENVIRONMENT = YOUR_ENVIRONMENT
  REACT_APP_NUXEO_SECRET_KEY = YOUR_NUXEO_SECRET_KEY
  REACT_APP_NUXEO_URL = YOUR_NUXEO_URL
  REACT_APP_MUI_X_DATA_GRID_LICENSE_KEY = YOUR_MUI_X_DATA_GRID_LICENSE_KEY
  1. Set .env.production file for production environment (Production Build) (Optional)
  REACT_APP_BASE_SERVICE_URL = YOUR_SERVICE_URL
  REACT_APP_ACCESS_TOKEN_KEY = YOUR_ACCESS_TOKEN_KEY
  REACT_APP_ENVIRONMENT = YOUR_ENVIRONMENT
  REACT_APP_NUXEO_SECRET_KEY = YOUR_NUXEO_SECRET_KEY
  REACT_APP_NUXEO_URL = YOUR_NUXEO_URL
  REACT_APP_MUI_X_DATA_GRID_LICENSE_KEY = YOUR_MUI_X_DATA_GRID_LICENSE_KEY
  1. Hot Refresh (Development) React ❌
  npm run start:react
  1. Webpack Development with Module Federation
  npm run start
  1. Build (Production) with Webpack
  npm run build:prod

Storybook Kullanımı

İlk olarak yeni eklenen komponentlerin /stories dizinine eklenmesi gerekmektedir. Oluşturulmuş Örnek bir komponent için  /stories/Button.stories.tsx dosyasına bakabilirsiniz. Daha sonra npm run storybook komutu ile çalıştırılıp herhangi bir hata alınılmaması gerekmektedir. Detaylar için Storybook sitesine bakabilirsiniz.

  1. Storybook
  npm run storybook
  1. Build Storybook
  npm run build-storybook

Şunlar ile Build Edildi

UI kütüphanesini NPM paket olarak yayınlama

tsconfig.ts dosyası içerisinde "declaration": true, "declarationDir": "dist/" ve "include": ["index.ts"] alanları aktif edilir. Sonrasında ise package.json root dizinde "type": "module" alanı aktif edilir. npm run create komutu ile dist dizini içerisinde src/, index.d.ts , index.js ve index.js.map dosyaları oluşturulmalıdır. index.css dosyası dist/ dizini içerisine olmalıdır ve tailwind css style'ları içermelidir. src/ dosyası geliştirme yapılan componentleri içermelidir. package.json dosyası içerisinde "versin": 0.0.0 alanı bir üst versiyona çıkarılmalıdır. npm publish komutu ile npm paketi yayınlanır. npm run release komutu ile version otomatik olarak yükseltilir, build alınır ve otomatik npm paketi yeni versiyona güncellenir.

## Type Çıkarımı için

tsconfig.ts dosyası içerisinde "declaration": true, "declarationDir": "dist/" ve "include": ["index.ts"] alanları aktif edilir. Sonrasında ise package.json root dizinde "type": "module" alanı aktif edilir. npm run create komutu ile dist dizini içerisinde src/, index.d.ts , index.js ve index.js.map dosyaları oluşturulmalıdır.  dist/ klasörü içindeki src'de tüm type'lara erişebilirsiniz.

Webpack Module Federation Config

webpack.config.js dosyası içerisindeki moduller için local developmentta ekteki gibi olmalıdır.

const configs = {
  development: { ✅ Can be changed
    PUBLIC_PATH: 'http://localhost:3002/',
    GENEL_MUHASEBE: 'genelMuhasebeContainer@http://localhost:3005/remoteEntry.js',
    BUTCE: 'butce@http://localhost:3006/remoteEntry.js',
    FINANS: 'finans@http://localhost:3004/remoteEntry.js',
    BILANCO: 'bilanco@http://localhost:3007/remoteEntry.js',
    DIS: 'dis@http://localhost:3008/remoteEntry.js',
    SABIT_KIYMET: 'sabitKiymet@http://localhost:3009/remoteEntry.js',
    GENEL_YONETIM: 'genelYonetim@http://localhost:3010/remoteEntry.js',
    AURORA: 'aurora@http://localhost:3015/remoteEntry.js',
    GENEL_PARAMETRE: 'genelParametre@http://localhost:3012/remoteEntry.js',
    PROJE: 'proje@http://localhost:3013/remoteEntry.js',
    RAPORLAMA: 'raporlama@http://localhost:3014/remoteEntry.js',
    PORT: 3002,
  },
  production: { ❌ Can not be changed
    PUBLIC_PATH: 'https://bys2test.tedas.gov.tr/',
    GENEL_MUHASEBE: 'genelMuhasebeContainer@https://bysgenelmuhasebe.tedas.gov.tr/remoteEntry.js',
    BUTCE: 'butce@https://bys2test.tedas.gov.tr/butce/remoteEntry.js',
    FINANS: 'finans@https://bys2test.tedas.gov.tr/finans/remoteEntry.js',
    BILANCO: 'bilanco@https://bys2test.tedas.gov.tr/bilanco/remoteEntry.js',
    DIS: 'dis@https://bys2test.tedas.gov.tr/dis/remoteEntry.js',
    SABIT_KIYMET: 'sabitKiymet@https://bys2test.tedas.gov.tr/sabitKiymet/remoteEntry.js',
    GENEL_YONETIM: 'genelYonetim@bys2test.tedas.gov.tr/genelYonetim/remoteEntry.js',
    AURORA: 'aurora@https://bys2test.tedas.gov.tr/aurora/remoteEntry.js',
    GENEL_PARAMETRE: 'genelParametre@https://bys2test.tedas.gov.tr/genelParametre/remoteEntry.js',
    PROJE: 'proje@https://bys2test.tedas.gov.tr/proje/remoteEntry.js',
    RAPORLAMA: 'raporlama@https://bys2test.tedas.gov.tr/raporlama/remoteEntry.js',
    // PUBLIC_PATH: 'http://localhost:3002/',
    PORT: 3002,
  },
  none: { ❌ Can not be changed
    PUBLIC_PATH: 'https://bys2.tedas.gov.tr/',
    GENEL_MUHASEBE: 'genelMuhasebeContainer@https://bys2.tedas.gov.tr/genel-muhasebe/remoteEntry.js',
    BUTCE: 'butce@https://bys2.tedas.gov.tr/butce/remoteEntry.js',
    FINANS: 'finans@https://bys2.tedas.gov.tr/finans/remoteEntry.js',
    BILANCO: 'bilanco@https://bys2.tedas.gov.tr/bilanco/remoteEntry.js',
    DIS: 'dis@https://bys2.tedas.gov.tr/dis/remoteEntry.js',
    SABIT_KIYMET: 'sabitKiymet@https://bys2.tedas.gov.tr/sabitKiymet/remoteEntry.js',
    GENEL_YONETIM: 'genelYonetim@bys2test.tedas.gov.tr/genelYonetim/remoteEntry.js',
    AURORA: 'aurora@https://bys2.tedas.gov.tr/aurora/remoteEntry.js',
    GENEL_PARAMETRE: 'genelParametre@https://bys2.tedas.gov.tr/genelParametre/remoteEntry.js',
    PROJE: 'proje@https://bys2.tedas.gov.tr/proje/remoteEntry.js',
    RAPORLAMA: 'raporlama@https://bys2.tedas.gov.tr/raporlama/remoteEntry.js',
    PORT: 3002,
  },
};
import { FileCopyIcon, MoreVertIcon, TrashIcon } from 'common/assets/icons/Icons';
import EmptyList from 'components/empty-list';
import ExpandableMenu from 'components/expandable-menu/ExpandableMenu';
import CustomTable from 'components/form-elements/CustomTable';
import SkeletonWrapper from 'components/skeleton/Skeleton';
import React, { useState } from 'react';

type TTableListItem = {
  yetkiKodu: string;
  yetkiAdi: string;
  modulId: string;
  modulAdi: string;
  endpoint: string;
  endpointAdi: string;
};

const columns: Record<keyof TTableListItem, string> = {
  yetkiKodu: 'Yetki Kodu',
  yetkiAdi: 'Yetki Adı',
  modulId: 'Modül ID',
  modulAdi: 'Modül Adı',
  endpoint: 'Endpoint',
  endpointAdi: 'Endpoint Adı',
};

export default function LoginPage() {
  const [ screenLoading, setScreenLoading ] = useState(false);

  const [ tableList, setTableList ] = useState<TTableListItem[]>([
    {
      yetkiKodu: 'yetkiKodu',
      yetkiAdi: 'yetkiAdi',
      modulId: 'modulId',
      modulAdi: 'modulAdi',
      endpoint: 'endpoint',
      endpointAdi: 'endpointAdi',
    },
  ]);

  const handleDeleteRow = (rowItem: TTableListItem, index = 0) => {
    setTimeout(() => {
      setTableList((prev) => {
        const newList = [ ...prev ];

        newList.splice(index, 1);

        return newList;
      });
      setScreenLoading(false);
    }, 100);
  };

  const handleDuplicateRow = (rowItem: TTableListItem, index = 0) => {
    setTimeout(() => {
      setTableList((prev) => {
        const newList = [ ...prev ];

        newList.splice(index, 0, rowItem);

        return newList;
      });
      setScreenLoading(false);
    }, 100);
  };

  const handleRenderRowSelectionColumn = (
    rowItem: TTableListItem,
    index?: number,
  ) => (
    <div className="flex flex-row items-center justify-center">
      <ExpandableMenu
        expandableMenuIcon={<MoreVertIcon className="!text-black" />}
        options={[
          {
            icon: <TrashIcon className="mr-1 text-error-600" />,
            label: 'Satırı Sil',
            onClick: () => handleDeleteRow(rowItem, index),
          },
          {
            icon: <FileCopyIcon className="mr-1 text-primary-600" />,
            label: 'Satırı Kopyala',
            onClick: () => handleDuplicateRow(rowItem, index),
          },
        ]}
      />
    </div>
  );

  const renderTable = () => {
    if (screenLoading) {
      return (
        <div className="w-full p-4 bg-gray-100 rounded-lg">
          <SkeletonWrapper animation="wave" variant="rectangular" />
        </div>
      );
    }

    if (tableList.length > 0) {
      return (
        <CustomTable
          exportPDF
          importXLSX
          isSortable
          columnHeaderLabelsByKey={columns}
          getData={setTableList}
          importedFileCallback={(data) => {
            setScreenLoading(true);
            setTimeout(() => {
              setTableList(data);
              setScreenLoading(false);
            }, 1000);
          }}
          initialData={tableList}
          renderRowSelectionColumn={handleRenderRowSelectionColumn}
          showPagination={false}
        />
      );
    }

      <EmptyList
        className="flex flex-col items-center justify-center py-4 text-center border rounded-lg gap-y-4"
        label="Yetki Bulunamadı"
      />;
  };

  return (
    <div className="w-full h-full p-4 bg-white rounded-lg">{renderTable()}</div>
  );
}

Formatter

/* eslint-disable max-len */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import React from 'react';
import './index.css';
import 'bys-container-ui/dist/index.css';

import * as ReactDOMClient from 'react-dom/client';
import { routes } from 'routes/Routes';
import 'react-datepicker/dist/react-datepicker.css';
import { LicenseInfo } from '@mui/x-license-pro';
import Providers from 'providers';
import { useGlobalConfig } from 'common/hooks/useGlobalConfig';
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
import Loading from 'components/loading/Loading';
import { isNaN } from 'lodash';
import { z } from 'zod';
import Wrapper from './Wrapper';

LicenseInfo.setLicenseKey(process.env.REACT_APP_MUI_X_DATA_GRID_LICENSE_KEY!);

const container = document.getElementById('app');
const root = ReactDOMClient.createRoot(container!);

export interface FisSatirlar {
  FS_ToplamTutar: string | null;
  FS_Miktar: string | null;
  FS_KonaklamaOran: string | null;
  FS_KDV_ACIKLAMA: string | null;
  FS_Aciklama: string | null;
  FS_SKHAREKETOID: string | null;
  FS_FaturaOID: string | null;
  FS_KonaklamaTutar: string | null;
  FS_Kaynak: string | null;
  FS_BirimFiyat: string | null;
  FS_SatirNo: string | null;
  FS_OlcuBirimi: string | null;
  FS_OIVOrani: string | null;
  FS_KDV1Tutari: string | null;
  FS_MalzemeKodu: string | null;
  FS_Tevkifat1: string | null;
  FS_Tevkifat2: string | null;
  FS_TevkifatTutar1: string | null;
  FS_KDV1Orani: string | null;
  FS_TevkifatTutar2: string | null;
  FS_OIVTutari: string | null;
}

const schema = z.object({
  faturaSatirlari: z.array(z.object({
    FS_ToplamTutar: z.string().nullable(),
    FS_Miktar: z.string().nullable(),
    FS_KonaklamaOran: z.string().nullable(),
    FS_KDV_ACIKLAMA: z.string().nullable(),
    FS_Aciklama: z.string().nullable(),
    FS_SKHAREKETOID: z.string().nullable(),
    FS_FaturaOID: z.string().nullable(),
    FS_KonaklamaTutar: z.string().nullable(),
    FS_Kaynak: z.string().nullable(),
    FS_BirimFiyat: z.string().nullable(),
    FS_SatirNo: z.string().nullable(),
    FS_OlcuBirimi: z.string().nullable(),
    FS_OIVOrani: z.string().nullable(),
    FS_KDV1Tutari: z.string().nullable(),
    FS_MalzemeKodu: z.string().nullable(),
    FS_Tevkifat1: z.string().nullable(),
    FS_Tevkifat2: z.string().nullable(),
    FS_TevkifatTutar1: z.string().nullable(),
    FS_KDV1Orani: z.string().nullable(),
    FS_TevkifatTutar2: z.string().nullable(),
    FS_OIVTutari: z.string().nullable(),
  })).nonempty(),
});

function parseValue(value: string): string | number | null {
  if (value === 'null') {
    return null;
  }

  if (!isNaN(parseFloat(value))) {
    return parseFloat(value);
  }

  return value;
}

function parseFaturaString(input: string): FisSatirlar[] {
  const lines = input.trim().split('\n');
  const faturaSatirlari: FisSatirlar[] = [];
  let currentFaturaIndex = -1;

  lines.forEach((line) => {
    const match = line.match(/faturaSatirlari\[(\d+)\]\[([^\]]+)\]\.{2,}(.+)/);

    if (match) {
      const index = parseInt(match[1], 10);
      const key = match[2].trim() as keyof FisSatirlar;
      const value = match[3].trim();

      if (index !== currentFaturaIndex) {
        currentFaturaIndex = index;
        faturaSatirlari[index] = {
          FS_Aciklama: null,
          FS_BirimFiyat: null,
          FS_FaturaOID: null,
          FS_KDV1Orani: null,
          FS_KDV1Tutari: null,
          FS_KDV_ACIKLAMA: null,
          FS_Kaynak: null,
          FS_KonaklamaOran: null,
          FS_KonaklamaTutar: null,
          FS_MalzemeKodu: null,
          FS_Miktar: null,
          FS_OIVOrani: null,
          FS_OIVTutari: null,
          FS_OlcuBirimi: null,
          FS_SatirNo: null,
          FS_SKHAREKETOID: null,
          FS_Tevkifat1: null,
          FS_Tevkifat2: null,
          FS_TevkifatTutar1: null,
          FS_TevkifatTutar2: null,
          FS_ToplamTutar: null,
        };
      }

      // eslint-disable-next-line @typescript-eslint/ban-ts-comment
      // @ts-ignore
      faturaSatirlari[index][key] = parseValue(value)?.toString() ?? null;
    }
  });

  const parsedFatura = schema.parse({ faturaSatirlari });

  return parsedFatura.faturaSatirlari;
}

const inputString = 'faturaSatirlari[0][FS_ToplamTutar]......42.08\nfaturaSatirlari[0][FS_Miktar]...........1\nfaturaSatirlari[0][FS_KonaklamaOran]....0.0\nfaturaSatirlari[0][FS_KDV_ACIKLAMA].....null\nfaturaSatirlari[0][FS_Aciklama].........FİLİZ ECE CABBAR\nfaturaSatirlari[0][FS_SKHAREKETOID].....null\nfaturaSatirlari[0][FS_FaturaOID]........0b4serlcfrh1le01\nfaturaSatirlari[0][FS_KonaklamaTutar]...null\nfaturaSatirlari[0][FS_Kaynak]...........0\nfaturaSatirlari[0][FS_BirimFiyat].......42.0792\nfaturaSatirlari[0][FS_SatirNo]..........1\nfaturaSatirlari[0][FS_OlcuBirimi].......1\nfaturaSatirlari[0][FS_OIVOrani].........0.0\nfaturaSatirlari[0][FS_KDV1Tutari].......0.42\nfaturaSatirlari[0][FS_MalzemeKodu]......null\nfaturaSatirlari[0][FS_Tevkifat1]........null\nfaturaSatirlari[0][FS_Tevkifat2]........null\nfaturaSatirlari[0][FS_TevkifatTutar1]...0\nfaturaSatirlari[0][FS_KDV1Orani]........1.0\nfaturaSatirlari[0][FS_TevkifatTutar2]...0\nfaturaSatirlari[0][FS_OIVTutari]........0\nfaturaSatirlari[1][FS_ToplamTutar]......42.08\nfaturaSatirlari[1][FS_Miktar]...........1\nfaturaSatirlari[1][FS_KonaklamaOran]....0.0\nfaturaSatirlari[1][FS_KDV_ACIKLAMA].....null\nfaturaSatirlari[1][FS_Aciklama].........ASLI ÜSTÜNDAĞ\nfaturaSatirlari[1][FS_SKHAREKETOID].....null\nfaturaSatirlari[1][FS_FaturaOID]........0b4serlcfrh1le01\nfaturaSatirlari[1][FS_KonaklamaTutar]...null\nfaturaSatirlari[1][FS_Kaynak]...........0\nfaturaSatirlari[1][FS_BirimFiyat].......42.0792\nfaturaSatirlari[1][FS_SatirNo]..........2\nfaturaSatirlari[1][FS_OlcuBirimi].......1\nfaturaSatirlari[1][FS_OIVOrani].........0.0\nfaturaSatirlari[1][FS_KDV1Tutari].......0.42\nfaturaSatirlari[1][FS_MalzemeKodu]......null\nfaturaSatirlari[1][FS_Tevkifat1]........null\nfaturaSatirlari[1][FS_Tevkifat2]........null\nfaturaSatirlari[1][FS_TevkifatTutar1]...0\nfaturaSatirlari[1][FS_KDV1Orani]........1.0\nfaturaSatirlari[1][FS_TevkifatTutar2]...0\nfaturaSatirlari[1][FS_OIVTutari]........0\nfaturaOID...............................0b4serlcfrh1le01\n';
const parsedFatura = parseFaturaString(inputString);

window.console.log(JSON.stringify(parsedFatura, null, 2));

function App() {
  useGlobalConfig();

  return (
    <Providers>
      <Wrapper>
        <RouterProvider
          fallbackElement={<Loading />}
          router={createBrowserRouter(routes)}
        />
      </Wrapper>
    </Providers>
  );
}

export default App;

root.render(<App />);

Nx Monorepo

Nx Data katmanı

Table'ı

columns = [{ inptType: 'text' | 'select' |  'date' | 'number' | 'checkbox' | 'radio' | 'file' | 'button' | 'custom', props: TextInputProps, options: [], renderCell: (tableProps: table) => JSX.Element, }]

<Datatable {...props} isEditable /> <input type="text" {...props} />

matlab uzantılı dosyaları okumak için

İNPUT: 
  X: Giriş verisi matrisi (örnek sayısı x özellik sayısı)
  y: Gerçek çıkış değerleri vektörü
  learning_rate: Öğrenme hızı
  momentum: Momentum katsayısı
  epochs: Eğitim iterasyon sayısı

PARAMETRELER:
  input_weights: Giriş katmanı ağırlıkları
  output_weights: Çıkış katmanı ağırlıkları
  input_velocity: Giriş katmanı için momentum hızı
  output_velocity: Çıkış katmanı için momentum hızı

BAŞLANGIÇ:
  input_weights, output_weights, input_velocity, output_velocity başlatılır

FOR epoch = 1 TO epochs:
  % İleri Yayılım
  hidden_layer_input = X * input_weights
  hidden_layer_output = sigmoid(hidden_layer_input)
  output_layer_input = hidden_layer_output * output_weights
  predicted_output = sigmoid(output_layer_input)

  % Hata hesaplama
  error = y - predicted_output

  % Geriye Yayılım
  output_error = error .* sigmoid_derivative(predicted_output)
  hidden_layer_error = (output_error * output_weights') .* sigmoid_derivative(hidden_layer_output)

  % Güncellenmiş ağırlıkları hesaplama
  input_velocity = (momentum * input_velocity) + (learning_rate * X' * hidden_layer_error)
  input_weights = input_weights + input_velocity

  output_velocity = (momentum * output_velocity) + (learning_rate * hidden_layer_output' * output_error)
  output_weights = output_weights + output_velocity

  IF epoch MOD 1000 == 0:
    mse = mean(error.^2)
    PRINT("Epoch ", epoch, ", Mean Squared Error: ", mse)

RETURN input_weights, output_weights
function [input_weights, output_weights] = momentum_backpropagation(X, y, learning_rate, momentum, epochs)
    input_size = size(X, 2);
    hidden_size = 4;
    output_size = 1;

    % Ağırlıkları ve momentum için hızları başlatma
    input_weights = rand(input_size, hidden_size);
    output_weights = rand(hidden_size, output_size);

    input_velocity = zeros(size(input_weights));
    output_velocity = zeros(size(output_weights));

    for epoch = 1:epochs
        % İleri Yayılım
        hidden_layer_input = X * input_weights;
        hidden_layer_output = sigmoid(hidden_layer_input);

        output_layer_input = hidden_layer_output * output_weights;
        predicted_output = sigmoid(output_layer_input);

        % Hata hesaplama
        error = y - predicted_output;

        % Geriye Yayılım
        output_error = error .* sigmoid_derivative(predicted_output);
        hidden_layer_error = (output_error * output_weights') .* sigmoid_derivative(hidden_layer_output);

        % Güncellenmiş ağırlıkları hesaplama
        input_velocity = (momentum * input_velocity) + (learning_rate * X' * hidden_layer_error);
        input_weights = input_weights + input_velocity;

        output_velocity = (momentum * output_velocity) + (learning_rate * hidden_layer_output' * output_error);
        output_weights = output_weights + output_velocity;

        if mod(epoch, 1000) == 0
            mse = mean(error.^2);
            disp(['Epoch ', num2str(epoch), ', Mean Squared Error: ', num2str(mse)]);
        end
    end
end

% Sigmoid aktivasyon fonksiyonu
function result = sigmoid(x)
    result = 1 ./ (1 + exp(-x));
end

% Sigmoid aktivasyon fonksiyonunun türevi
function result = sigmoid_derivative(x)
    result = x .* (1 - x);
end

% Örnek veri
X = [0 0; 0 1; 1 0; 1 1];

% Etiketler
y = [0; 1; 1; 0];

% Hyperparametreler
learning_rate = 0.01;
momentum = 0.9;
epochs = 10000;

% Momentum ile Geriye Yayılımı uygula
[input_weights, output_weights] = momentum_backpropagation(X, y, learning_rate, momentum, epochs);
# buradaki dosyaları tek tek gez ve içerisinde git pull yap sonrasında npm run ui:updated komutunu çalıştır. Bittikten sonra ise git push yap. Message olarak 'UI Update' yaz.

for d in */ ; do
    cd $d

    echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"
    echo "INFO (serif) : action started for $d"
    echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"
   
    if [ ! -f package.json ]; then
        echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"
        echo "ERROR (serif) : package.json not found"
        echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"
        cd ..
        continue
    fi

    git pull
    npm run ui:update
    echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"
    echo "WARNING (serif) : UI Updating for $d"
    echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"

    version=$(node -p "require('./package.json').version")
    name=$(node -p "require('./package.json').name")
    date=$(date)
    if [ -z "$version" ]; then
        version="0.0.0"
    fi

    if [ -z "$name" ]; then
        name="unknown"
    fi

    git add .
    git commit -m "INFO (serif) : UI Updated project:$d, date:$date for version:$version"
    echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"
    echo "INFO (serif) : Changed committed for $name $date $version"
    echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"

    git push

    echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"
    echo "INFO (serif) : action finished for $d"
    echo "----------------------------------------------------------------------------------------------------------------------------------------------------------------"
    
    cd ..
done
0.0.1

3 months ago

0.1.8

3 months ago

0.1.7

3 months ago

0.1.6

3 months ago

0.1.4

3 months ago

0.1.3

3 months ago

0.1.5

3 months ago

0.1.2

3 months ago

0.1.1

3 months ago

0.0.103

4 months ago

0.1.0

4 months ago

0.0.102

4 months ago

0.0.100

4 months ago

0.0.95

4 months ago

0.0.98

4 months ago

0.0.99

4 months ago

0.0.92

4 months ago

0.0.93

4 months ago

0.0.94

4 months ago

0.0.91

4 months ago

0.0.89

4 months ago

0.0.90

4 months ago

0.0.87

4 months ago

0.0.88

4 months ago

0.0.86

5 months ago

0.0.85

5 months ago

0.0.84

5 months ago

0.0.83

5 months ago

0.0.82

5 months ago

0.0.81

5 months ago

0.0.80

5 months ago

0.0.79

5 months ago

0.0.78

5 months ago

0.0.77

5 months ago

0.0.76

5 months ago

0.0.75

5 months ago

0.0.74

5 months ago

0.0.73

5 months ago

0.0.72

5 months ago

0.0.71

6 months ago

0.0.70

6 months ago

0.0.69

6 months ago

0.0.68

6 months ago

0.0.67

6 months ago

0.0.66

6 months ago

0.0.65

6 months ago

0.0.64

6 months ago

0.0.63

6 months ago

0.0.62

6 months ago

0.0.61

6 months ago

0.0.60

6 months ago

0.0.59

6 months ago

0.0.58

6 months ago

0.0.57

6 months ago

0.0.56

6 months ago

0.0.55

6 months ago

0.0.54

6 months ago

0.0.53

6 months ago

0.0.52

6 months ago

0.0.51

6 months ago

0.0.50

6 months ago

0.0.49

6 months ago

0.0.48

7 months ago

0.0.47

7 months ago

0.0.46

7 months ago

0.0.45

7 months ago

0.0.44

7 months ago

0.0.43

7 months ago

0.0.42

7 months ago

0.0.41

7 months ago

0.0.40

7 months ago

0.0.39

7 months ago

0.0.38

7 months ago

0.0.37

7 months ago

0.0.36

7 months ago

0.0.35

7 months ago

0.0.34

7 months ago

0.0.33

7 months ago

0.0.32

7 months ago

0.0.31

7 months ago

0.0.30

7 months ago

0.0.29

7 months ago

0.0.28

7 months ago

0.0.27

8 months ago

0.0.26

8 months ago

0.0.25

8 months ago

0.0.24

8 months ago

0.0.23

8 months ago

0.0.22

8 months ago

0.0.21

8 months ago

0.0.20

8 months ago

0.0.19

8 months ago

0.0.18

8 months ago

0.0.17

8 months ago

0.0.16

8 months ago

0.0.15

8 months ago

0.0.14

8 months ago

0.0.13

8 months ago

0.0.12

9 months ago

0.0.11

9 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago