File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 "dev" : " objectstack dev" ,
1414 "build" : " objectstack compile objectstack.config.ts dist/crm.json" ,
1515 "typecheck" : " tsc --noEmit" ,
16- "test" : " echo \" Error: no test specified\" && exit 1 "
16+ "test" : " echo \" No test specified\" && exit 0 "
1717 },
1818 "dependencies" : {
1919 "@objectstack/spec" : " workspace:*"
Original file line number Diff line number Diff line change 66 "dev" : " tsx src/index.ts" ,
77 "build" : " tsc --noEmit" ,
88 "typecheck" : " tsc --noEmit" ,
9- "test" : " echo \" Error: no test specified\" && exit 1 " ,
9+ "test" : " echo \" No test specified\" && exit 0 " ,
1010 "clean" : " rm -rf dist node_modules"
1111 },
1212 "dependencies" : {
Original file line number Diff line number Diff line change 99 "dev" : " pnpm msw:init && vite" ,
1010 "build" : " pnpm msw:init && tsc && vite build" ,
1111 "typecheck" : " tsc --noEmit" ,
12- "test" : " echo \" Error: no test specified\" && exit 1 " ,
12+ "test" : " echo \" No test specified\" && exit 0 " ,
1313 "preview" : " vite preview"
1414 },
1515 "dependencies" : {
Original file line number Diff line number Diff line change 1313 "dev" : " objectstack dev" ,
1414 "build" : " objectstack compile objectstack.config.ts dist/objectstack.json" ,
1515 "typecheck" : " tsc --noEmit" ,
16- "test" : " echo \" Error: no test specified\" && exit 1 "
16+ "test" : " echo \" No test specified\" && exit 0 "
1717 },
1818 "dependencies" : {
1919 "@objectstack/client" : " workspace:*" ,
Original file line number Diff line number Diff line change @@ -4,7 +4,19 @@ import type {
44} from '@objectstack/spec/system' ;
55import type { ObjectLogger } from './logger.js' ;
66import type { Plugin } from './types.js' ;
7- import { randomUUID } from 'crypto' ;
7+
8+ // Polyfill for UUID generation to support both Node.js and Browser
9+ const generateUUID = ( ) => {
10+ if ( typeof crypto !== 'undefined' && crypto . randomUUID ) {
11+ return crypto . randomUUID ( ) ;
12+ }
13+ // Basic UUID v4 fallback
14+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' . replace ( / [ x y ] / g, function ( c ) {
15+ const r = Math . random ( ) * 16 | 0 ;
16+ const v = c === 'x' ? r : ( r & 0x3 | 0x8 ) ;
17+ return v . toString ( 16 ) ;
18+ } ) ;
19+ } ;
820
921/**
1022 * Plugin State Manager
@@ -40,7 +52,7 @@ class PluginStateManager {
4052 } ,
4153 } ;
4254
43- const snapshotId = randomUUID ( ) ;
55+ const snapshotId = generateUUID ( ) ;
4456
4557 switch ( config . stateStrategy ) {
4658 case 'memory' :
You can’t perform that action at this time.
0 commit comments