Skip to content

Commit

Permalink
Refactors protolib to have an extra directory level, with all the sou…
Browse files Browse the repository at this point in the history
…rce code inside src/. This will allow to have dist/ and to select between development and compiled versions of protolib
  • Loading branch information
jcarlosn committed Jul 6, 2024
1 parent 6f1cfc7 commit 5a80b34
Show file tree
Hide file tree
Showing 581 changed files with 1,709 additions and 1,686 deletions.
2 changes: 1 addition & 1 deletion apps/admin-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const moduleAlias = require('module-alias')

moduleAlias.addAliases({
"app": path.resolve(__dirname, '../../../packages/app'),
"protolib": path.resolve(__dirname, '../../../packages/protolib')
"protolib": path.resolve(__dirname, '../../../packages/protolib/src')
});

import dotenv from 'dotenv'
Expand Down
44 changes: 22 additions & 22 deletions apps/admin-api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,35 @@
],

"paths": {
"protolib/*": ["packages/protolib/*"], // Ajusta el path según tu estructura
"app/*": ["packages/app/*"] // Ajusta el path según tu estructura
"protolib/*": ["./protolib/src/*"],
"app/*": ["./app/*"]
}
},
"include": [
"./src/**/*.ts",
"../../.types/*.ts",
"../../packages/protolib/adminapi/**/*",
"../../packages/protolib/api/**/*",
"../../packages/protolib/base/**/*",
"../../packages/protolib/schema/**/*",
"../../packages/app/bundles/apiContext.ts",
"../../packages/app/bundles/adminapi.ts",
"../../packages/app/bundles/objects.ts",
"../../packages/app/bundles/library.ts",
"../../packages/app/bundles/storageProviders.ts",
"../../packages/app/BaseConfig.ts",
"../../packages/app/conf.ts",
"../../packages/app/initialData.ts",
"../../packages/app/templates/**/*",
"../../packages/app/schema/**/*",
"../../packages/protolib/bundles/adminapi.ts",
"../../packages/protolib/bundles/library.ts",
"../../packages/protolib/bundles/apiContext.ts",
"../../packages/protolib/bundles/objects.ts",
"../../packages/app/bundles/custom/fsm/**/*",
"./protolib/src/adminapi/**/*",
"./protolib/src/api/**/*",
"./protolib/src/base/**/*",
"./protolib/src/schema/**/*",
"./app/bundles/apiContext.ts",
"./app/bundles/adminapi.ts",
"./app/bundles/objects.ts",
"./app/bundles/library.ts",
"./app/bundles/storageProviders.ts",
"./app/BaseConfig.ts",
"./app/conf.ts",
"./app/initialData.ts",
"./app/templates/**/*",
"./app/schema/**/*",
"./protolib/src/bundles/adminapi.ts",
"./protolib/src/bundles/library.ts",
"./protolib/src/bundles/apiContext.ts",
"./protolib/src/bundles/objects.ts",
"./app/bundles/custom/fsm/**/*",
],
"exclude": [
"node_modules",
"../../packages/protolib/base/components/*",
"./protolib/src/base/components/*",
]
}
2 changes: 1 addition & 1 deletion apps/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';

moduleAlias.addAliases({
"app": path.resolve(__dirname, '../../../packages/app'),
"protolib": path.resolve(__dirname, '../../../packages/protolib')
"protolib": path.resolve(__dirname, '../../../packages/protolib/src')
});

import dotenv from 'dotenv'
Expand Down
38 changes: 19 additions & 19 deletions apps/api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,32 @@
],

"paths": {
"protolib/*": ["packages/protolib/*"],
"app/*": ["packages/app/*"]
"protolib/*": ["./protolib/src/*"],
"app/*": ["./app/*"]
}
},
"include": [
"./src/**/*.ts",
"../../.types/*.ts",
"../../packages/protolib/api/**/*",
"../../packages/protolib/base/**/*",
"../../packages/protolib/schema/**/*",
"../../packages/app/bundles/apiContext.ts",
"../../packages/app/bundles/apis.ts",
"../../packages/app/bundles/objects.ts",
"../../packages/app/bundles/library.ts",
"../../packages/app/bundles/storageProviders.ts",
"../../packages/app/BaseConfig.ts",
"../../packages/app/initialData.ts",
"../../packages/app/templates/**/*",
"../../packages/app/schema/**/*",
"../../packages/protolib/bundles/apiContext.ts",
"../../packages/protolib/bundles/devices/devices/devicesSchemas.ts",
"../../packages/protolib/bundles/library.ts",
"../../packages/protolib/bundles/objects.ts"
"./protolib/src/api/**/*",
"./protolib/src/base/**/*",
"./protolib/src/schema/**/*",
"./app/bundles/apiContext.ts",
"./app/bundles/apis.ts",
"./app/bundles/objects.ts",
"./app/bundles/library.ts",
"./app/bundles/storageProviders.ts",
"./app/BaseConfig.ts",
"./app/initialData.ts",
"./app/templates/**/*",
"./app/schema/**/*",
"./protolib/src/bundles/apiContext.ts",
"./protolib/src/bundles/devices/devices/devicesSchemas.ts",
"./protolib/src/bundles/library.ts",
"./protolib/src/bundles/objects.ts"
],
"exclude": [
"node_modules",
"../../packages/protolib/base/components/*",
"./protolib/src/base/components/*",
]
}
9 changes: 6 additions & 3 deletions apps/electron/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"paths": {
"react-native": [
"react-native-web"
]
],
"protolib/*": ["../../packages/protolib/src/*"]
},
"allowJs": true,
"skipLibCheck": true,
Expand All @@ -28,7 +29,7 @@
{
"name": "next"
}
]
],
},
"typeRoots": [ // Specifies a list of directories for type definitions
"./node_modules/@types",
Expand All @@ -39,7 +40,9 @@
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
".next/types/**/*.ts",
"../../packages/protolib/src/**/*.ts",
"../../packages/protolib/src/**/*.tsx"
],
"exclude": [
"node_modules"
Expand Down
2 changes: 1 addition & 1 deletion apps/expo/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function (api) {
'protoflow/src/fields/WeekdayPicker': '../../packages/protoflow/src/fields/WeekdayPicker.tsx',
'protoflow/src/diagram/NodeText' : '../../packages/protoflow/src/diagram/NodeText.tsx',
protoflow: '../../packages/protoflow/src',
protolib: '../../packages/protolib',
protolib: '../../packages/protolib/src',
app: '../../packages/app',
'@my/ui': '../../packages/ui',
stream: 'stream-browserify',
Expand Down
1 change: 1 addition & 0 deletions apps/next/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'protoflow/src/styles.css'
import 'protoflow/src/diagram/menu.module.css'
import 'react-sliding-side-panel/lib/index.css'
import 'protolib/styles/datatable.css';
import 'protolib/styles/styles.css';
import '../chat.css'
import '../map.css'
import '../chonky.css'
Expand Down
7 changes: 5 additions & 2 deletions apps/next/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"paths": {
"react-native": [
"react-native-web"
]
],
"protolib/*": ["../../packages/protolib/src/*"]
},
"allowJs": true,
"skipLibCheck": true,
Expand Down Expand Up @@ -40,7 +41,9 @@
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"jest/jest-globals.d.ts"
"jest/jest-globals.d.ts",
"../../packages/protolib/src/**/*.ts",
"../../packages/protolib/src/**/*.tsx"
],
"exclude": [
"node_modules"
Expand Down
6 changes: 4 additions & 2 deletions packages/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"@lib/*": ["./lib/*"],
"@data/*": ["./data/*"],
"react-native": ["react-native-web"],
"@/*": ["./*"]
"@/*": ["./*"],
"protolib/*": ["../protolib/src/*"]
}
}
},
"include": ["./**/*.ts", "./**/*.tsx", "../protolib/src/**/*.ts", "../protolib/src/**/*.tsx"],
}
8 changes: 6 additions & 2 deletions packages/protodevice/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@
"es6",
"dom",
"esnext.asynciterable"
]
],
"paths": {
"protolib/*": ["../protolib/src/*"]
}
},
"include": [
"src/**/*.ts",
"src/**/*.tsx"
"src/**/*.tsx",
"../protolib/src/**/*.ts",
],
"exclude": [
"node_modules"
Expand Down
7 changes: 5 additions & 2 deletions packages/protoflow/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
"outDir": "./lib",
"strict": false,
"jsx": "react",
"esModuleInterop": true
"esModuleInterop": true,
"paths": {
"protolib/*": ["../protolib/src/*"]
}
},
"include": ["src", "index.tsx"],
"include": ["src", "index.tsx", "../protolib/src/**/*.ts", "../protolib/src/**/*.tsx"],
"exclude": ["node_modules", "**/__tests__/*"]
}
4 changes: 3 additions & 1 deletion packages/protolib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
],
"scripts": {
"pull": "git pull",
"test": "jest --passWithNoTests"
"test": "jest --passWithNoTests",
"build": "tamagui-build"
},
"dependencies": {
"@blueprintjs/table": "5.1.5",
Expand Down Expand Up @@ -61,6 +62,7 @@
},
"devDependencies": {
"@jest/globals": "~29.7.0",
"@tamagui/build": "^1.101.7",
"@types/jest": "~29.5.5",
"@types/react": "^18.0.27",
"jest": "~29.7.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5a80b34

Please sign in to comment.