@things-factory/shell 9.1.19 → 10.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,10 @@ exports.DEFAULT_POOL_CONFIG = {
19
19
  '--hide-scrollbars',
20
20
  '--mute-audio',
21
21
  '--no-sandbox',
22
- '--use-gl=egl',
22
+ '--enable-gpu',
23
+ '--use-gl=angle',
24
+ '--use-angle=swiftshader',
25
+ '--enable-unsafe-swiftshader',
23
26
  '--use-mock-keychain',
24
27
  '--disable-password-manager-reauthentication',
25
28
  '--disable-keychain-reauthorization',
@@ -42,7 +45,7 @@ exports.DEFAULT_POOL_CONFIG = {
42
45
  };
43
46
  // Common argument sets
44
47
  exports.HEADLESS_POOL_ARGUMENT_SETS = {
45
- basic: ['--hide-scrollbars', '--mute-audio', '--no-sandbox', '--use-gl=egl'],
48
+ basic: ['--hide-scrollbars', '--mute-audio', '--no-sandbox', '--enable-gpu', '--use-gl=angle', '--use-angle=swiftshader', '--enable-unsafe-swiftshader'],
46
49
  keychain_safe: [
47
50
  '--use-mock-keychain',
48
51
  '--disable-password-manager-reauthentication',
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../server/utils/headless-pool/config.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwFH,kCAOC;AArED,yBAAyB;AACZ,QAAA,mBAAmB,GAAsD;IACpF,gBAAgB;IAChB,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,EAAE;IACP,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,MAAM,EAAE,YAAY;IACvC,YAAY,EAAE,IAAI;IAElB,mBAAmB;IACnB,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE;QACJ,mBAAmB;QACnB,cAAc;QACd,cAAc;QACd,cAAc;QACd,qBAAqB;QACrB,6CAA6C;QAC7C,oCAAoC;QACpC,wBAAwB;QACxB,iCAAiC;QACjC,sBAAsB;QACtB,wBAAwB;QACxB,sDAAsD;QACtD,uCAAuC;QACvC,iCAAiC;QACjC,gBAAgB;QAChB,gCAAgC;QAChC,mCAAmC;KACpC;IACD,cAAc,EAAE,EAAE;IAElB,mBAAmB;IACnB,WAAW,EAAE,KAAK;IAClB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,IAAI;CACpB,CAAA;AAED,uBAAuB;AACV,QAAA,2BAA2B,GAAG;IACzC,KAAK,EAAE,CAAC,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC;IAE5E,aAAa,EAAE;QACb,qBAAqB;QACrB,6CAA6C;QAC7C,oCAAoC;QACpC,wBAAwB;QACxB,iCAAiC;QACjC,sBAAsB;QACtB,wBAAwB;QACxB,sDAAsD;QACtD,uCAAuC;QACvC,iCAAiC;QACjC,gBAAgB;QAChB,gCAAgC;QAChC,mCAAmC;KACpC;IAED,iBAAiB,EAAE,CAAC,0BAA0B,EAAE,yBAAyB,CAAC;CAC3E,CAAA;AAED,mCAAmC;AACnC,SAAgB,WAAW,CAAC,IAAwB,EAAE,WAA+B,EAAE;IACrF,OAAO;QACL,GAAG,2BAAmB;QACtB,GAAG,IAAI;QACP,GAAG,QAAQ;QACX,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,2BAAmB,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;KAC7E,CAAA;AACH,CAAC","sourcesContent":["/**\n * Headless Pool Configuration\n */\n\nexport type HeadlessMode = 'shell' | 'new' | boolean\n\nexport interface HeadlessPoolConfig {\n // Pool settings\n min?: number\n max?: number\n acquireTimeoutMillis?: number\n idleTimeoutMillis?: number\n testOnBorrow?: boolean\n\n // Browser launch settings\n headless?: HeadlessMode\n args?: string[]\n executablePath?: string\n\n // Features\n enableStats?: boolean\n enableRecovery?: boolean\n enableCleanup?: boolean\n\n // Custom setup function for special cases (like label pool)\n customSetup?: (browser: any) => Promise<any>\n}\n\n// Default configurations\nexport const DEFAULT_POOL_CONFIG: Required<Omit<HeadlessPoolConfig, 'customSetup'>> = {\n // Pool defaults\n min: 2,\n max: 10,\n acquireTimeoutMillis: 15000,\n idleTimeoutMillis: 300000, // 5 minutes\n testOnBorrow: true,\n\n // Browser defaults\n headless: 'shell',\n args: [\n '--hide-scrollbars',\n '--mute-audio',\n '--no-sandbox',\n '--use-gl=egl',\n '--use-mock-keychain',\n '--disable-password-manager-reauthentication',\n '--disable-keychain-reauthorization',\n '--disable-web-security',\n '--disable-site-isolation-trials',\n '--disable-extensions',\n '--disable-default-apps',\n '--disable-component-extensions-with-background-pages',\n '--disable-background-timer-throttling',\n '--disable-background-networking',\n '--disable-sync',\n '--disable-features=TranslateUI',\n '--disable-ipc-flooding-protection'\n ],\n executablePath: '',\n\n // Feature defaults\n enableStats: false,\n enableRecovery: false,\n enableCleanup: true\n}\n\n// Common argument sets\nexport const HEADLESS_POOL_ARGUMENT_SETS = {\n basic: ['--hide-scrollbars', '--mute-audio', '--no-sandbox', '--use-gl=egl'],\n\n keychain_safe: [\n '--use-mock-keychain',\n '--disable-password-manager-reauthentication',\n '--disable-keychain-reauthorization',\n '--disable-web-security',\n '--disable-site-isolation-trials',\n '--disable-extensions',\n '--disable-default-apps',\n '--disable-component-extensions-with-background-pages',\n '--disable-background-timer-throttling',\n '--disable-background-networking',\n '--disable-sync',\n '--disable-features=TranslateUI',\n '--disable-ipc-flooding-protection'\n ],\n\n security_enhanced: ['--disable-setuid-sandbox', '--disable-dev-shm-usage']\n}\n\n// Helper function to merge configs\nexport function mergeConfig(base: HeadlessPoolConfig, override: HeadlessPoolConfig = {}): HeadlessPoolConfig {\n return {\n ...DEFAULT_POOL_CONFIG,\n ...base,\n ...override,\n args: [...(base.args || DEFAULT_POOL_CONFIG.args), ...(override.args || [])]\n }\n}\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../server/utils/headless-pool/config.ts"],"names":[],"mappings":";AAA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AI;QACP,GAAG,QAAQ;QACX,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,2BAAmB,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;KAC7E,CAAA;AACH,CAAC","sourcesContent":["/**\n * Headless Pool Configuration\n */\n\nexport type HeadlessMode = 'shell' | 'new' | boolean\n\nexport interface HeadlessPoolConfig {\n // Pool settings\n min?: number\n max?: number\n acquireTimeoutMillis?: number\n idleTimeoutMillis?: number\n testOnBorrow?: boolean\n\n // Browser launch settings\n headless?: HeadlessMode\n args?: string[]\n executablePath?: string\n\n // Features\n enableStats?: boolean\n enableRecovery?: boolean\n enableCleanup?: boolean\n\n // Custom setup function for special cases (like label pool)\n customSetup?: (browser: any) => Promise<any>\n}\n\n// Default configurations\nexport const DEFAULT_POOL_CONFIG: Required<Omit<HeadlessPoolConfig, 'customSetup'>> = {\n // Pool defaults\n min: 2,\n max: 10,\n acquireTimeoutMillis: 15000,\n idleTimeoutMillis: 300000, // 5 minutes\n testOnBorrow: true,\n\n // Browser defaults\n headless: 'shell',\n args: [\n '--hide-scrollbars',\n '--mute-audio',\n '--no-sandbox',\n '--enable-gpu',\n '--use-gl=angle',\n '--use-angle=swiftshader',\n '--enable-unsafe-swiftshader',\n '--use-mock-keychain',\n '--disable-password-manager-reauthentication',\n '--disable-keychain-reauthorization',\n '--disable-web-security',\n '--disable-site-isolation-trials',\n '--disable-extensions',\n '--disable-default-apps',\n '--disable-component-extensions-with-background-pages',\n '--disable-background-timer-throttling',\n '--disable-background-networking',\n '--disable-sync',\n '--disable-features=TranslateUI',\n '--disable-ipc-flooding-protection'\n ],\n executablePath: '',\n\n // Feature defaults\n enableStats: false,\n enableRecovery: false,\n enableCleanup: true\n}\n\n// Common argument sets\nexport const HEADLESS_POOL_ARGUMENT_SETS = {\n basic: ['--hide-scrollbars', '--mute-audio', '--no-sandbox', '--enable-gpu', '--use-gl=angle', '--use-angle=swiftshader', '--enable-unsafe-swiftshader'],\n\n keychain_safe: [\n '--use-mock-keychain',\n '--disable-password-manager-reauthentication',\n '--disable-keychain-reauthorization',\n '--disable-web-security',\n '--disable-site-isolation-trials',\n '--disable-extensions',\n '--disable-default-apps',\n '--disable-component-extensions-with-background-pages',\n '--disable-background-timer-throttling',\n '--disable-background-networking',\n '--disable-sync',\n '--disable-features=TranslateUI',\n '--disable-ipc-flooding-protection'\n ],\n\n security_enhanced: ['--disable-setuid-sandbox', '--disable-dev-shm-usage']\n}\n\n// Helper function to merge configs\nexport function mergeConfig(base: HeadlessPoolConfig, override: HeadlessPoolConfig = {}): HeadlessPoolConfig {\n return {\n ...DEFAULT_POOL_CONFIG,\n ...base,\n ...override,\n args: [...(base.args || DEFAULT_POOL_CONFIG.args), ...(override.args || [])]\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/shell",
3
- "version": "9.1.19",
3
+ "version": "10.0.0-beta.2",
4
4
  "description": "Core module for framework",
5
5
  "bin": {
6
6
  "things-factory": "bin/things-factory",
@@ -11,7 +11,7 @@
11
11
  "things-factory-dockerize-arm": "bin/things-factory-dockerize-arm"
12
12
  },
13
13
  "main": "dist-server/index.js",
14
- "browser": "client/index.js",
14
+ "browser": "client/index.ts",
15
15
  "author": "Hearty Oh <heartyoh@hatiolab.com>",
16
16
  "things-factory": true,
17
17
  "license": "MIT",
@@ -51,18 +51,18 @@
51
51
  "@material/mwc-textfield": "^0.27.0",
52
52
  "@material/web": "^2.0.0",
53
53
  "@open-wc/scoped-elements": "^2.1.3",
54
- "@operato/graphql": "^9.0.0",
55
- "@operato/help": "^9.0.0",
56
- "@operato/layout": "^9.0.0",
57
- "@operato/shell": "^9.0.0",
58
- "@operato/typeorm-history": "^9.0.0",
59
- "@operato/utils": "^9.0.0",
54
+ "@operato/graphql": "^10.0.0-beta.1",
55
+ "@operato/help": "^10.0.0-beta.1",
56
+ "@operato/layout": "^10.0.0-beta.1",
57
+ "@operato/shell": "^10.0.0-beta.1",
58
+ "@operato/typeorm-history": "^10.0.0-beta.1",
59
+ "@operato/utils": "^10.0.0-beta.1",
60
60
  "@reduxjs/toolkit": "^2.2.5",
61
- "@things-factory/ejs-remote": "^9.1.13",
62
- "@things-factory/env": "^9.1.13",
61
+ "@things-factory/ejs-remote": "^10.0.0-beta.2",
62
+ "@things-factory/env": "^10.0.0-beta.2",
63
63
  "@things-factory/operato-license-checker": "^4.0.4",
64
- "@things-factory/styles": "^9.1.13",
65
- "@things-factory/utils": "^9.1.13",
64
+ "@things-factory/styles": "^10.0.0-beta.2",
65
+ "@things-factory/utils": "^10.0.0-beta.2",
66
66
  "@webcomponents/scoped-custom-element-registry": "^0.0.9",
67
67
  "@webcomponents/webcomponentsjs": "^2.6.0",
68
68
  "args": "^5.0.0",
@@ -107,7 +107,6 @@
107
107
  "pluralize": "^8.0.0",
108
108
  "promises-all": "^1.0.0",
109
109
  "puppeteer": "^24.5.0",
110
- "pwa-helpers": "^0.9.1",
111
110
  "react": "^18.2.0",
112
111
  "react-dom": "^18.2.0",
113
112
  "reflect-metadata": "^0.2.2",
@@ -118,7 +117,6 @@
118
117
  "type-graphql": "^2.0.0-rc.2",
119
118
  "typeorm": "^0.3.19",
120
119
  "uuid": "^10.0.0",
121
- "web-animations-js": "^2.3.2",
122
120
  "web-push": "^3.5.0",
123
121
  "webpack-dev-middleware": "^7.4.2",
124
122
  "ws": "^8.8.1"
@@ -131,5 +129,5 @@
131
129
  "pg": "^8.7.3",
132
130
  "sqlite3": "^5.0.8"
133
131
  },
134
- "gitHead": "078438034dbe19915108e89ff24024f7044a85a9"
132
+ "gitHead": "ea8a08ff802ae28a37fdda605b6356482e7a6faf"
135
133
  }
package/static/index.js CHANGED
@@ -1,5 +1 @@
1
- if ('serviceWorker' in navigator) {
2
- navigator.serviceWorker.register('/service-worker.js', {
3
- scope: '/'
4
- })
5
- }
1
+ /* Service Worker registration moved to the webpack bundle (client/index.js) for environment-aware control. */
@@ -66,7 +66,7 @@
66
66
  <noscript> Please enable JavaScript to view this website. </noscript>
67
67
  <!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
68
68
  <script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
69
- <script src="/node_modules/web-animations-js/web-animations-next.min.js"></script>
69
+
70
70
  <!-- Built with love using PWA Starter Kit -->
71
71
 
72
72
  <script src="/public/home.js"></script>
package/client/index.js DELETED
@@ -1,17 +0,0 @@
1
- // import '@webcomponents/scoped-custom-element-registry' // later only for @open-wc/scoped-elements@3
2
- import 'broadcastchannel-polyfill'
3
- import '@operato/shell/app.js'
4
-
5
- /* Export ENV */
6
- export const PROCESS = {
7
- 'APP-VERSION': process.env['APP-VERSION'],
8
- 'NODE-ENV': process.env['NODE-ENV']
9
- }
10
-
11
- /* Export APIs */
12
-
13
- // store, actions, page-view,
14
- export * from '@operato/shell'
15
-
16
- // graphql-client
17
- export * from '@operato/graphql'
@@ -1,26 +0,0 @@
1
- import { databaseInitializer } from '../../server/initializers/database'
2
-
3
- describe('orm', () => {
4
- var connection
5
-
6
- beforeAll(async () => {
7
- connection = await databaseInitializer()
8
- })
9
-
10
- afterAll(async () => {
11
- await connection.close()
12
- })
13
-
14
- beforeEach(async () => {
15
- const entities = connection.entityMetadatas
16
-
17
- entities.forEach(async entity => {
18
- const repository = connection.getRepository(entity.name)
19
- await repository.query(`DELETE FROM ${entity.tableName}`)
20
- })
21
- })
22
-
23
- it('creates a user', () => {
24
- // TODO
25
- })
26
- })
File without changes
File without changes
File without changes
File without changes