railcode 0.1.1 → 0.1.5

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.
@@ -15,6 +15,7 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@tailwindcss/vite": "4.3.1",
18
+ "@types/node": "26.0.0",
18
19
  "@types/react": "19.2.17",
19
20
  "@types/react-dom": "19.2.3",
20
21
  "@vitejs/plugin-react": "6.0.2",
@@ -779,6 +780,16 @@
779
780
  "tslib": "^2.4.0"
780
781
  }
781
782
  },
783
+ "node_modules/@types/node": {
784
+ "version": "26.0.0",
785
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.0.tgz",
786
+ "integrity": "sha512-vf2YFi1iY9lHGwNJMs01biZFbKJkrZR1T6/MlzjhJLPdntOHLhTrDSnSVcdtvjihi4VQNlrFRIxLsDBlQpAipA==",
787
+ "dev": true,
788
+ "license": "MIT",
789
+ "dependencies": {
790
+ "undici-types": "~8.3.0"
791
+ }
792
+ },
782
793
  "node_modules/@types/react": {
783
794
  "version": "19.2.17",
784
795
  "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz",
@@ -1397,6 +1408,13 @@
1397
1408
  "node": ">=14.17"
1398
1409
  }
1399
1410
  },
1411
+ "node_modules/undici-types": {
1412
+ "version": "8.3.0",
1413
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
1414
+ "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
1415
+ "dev": true,
1416
+ "license": "MIT"
1417
+ },
1400
1418
  "node_modules/vite": {
1401
1419
  "version": "8.0.16",
1402
1420
  "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz",
@@ -16,6 +16,7 @@
16
16
  },
17
17
  "devDependencies": {
18
18
  "@tailwindcss/vite": "4.3.1",
19
+ "@types/node": "26.0.0",
19
20
  "@types/react": "19.2.17",
20
21
  "@types/react-dom": "19.2.3",
21
22
  "@vitejs/plugin-react": "6.0.2",
@@ -1,5 +1,6 @@
1
1
  export type Identity = {
2
2
  user: string;
3
+ display_name?: string | null;
3
4
  app: string;
4
5
  };
5
6
 
@@ -10,6 +11,7 @@ export type AccessRule =
10
11
  export type AppUser = {
11
12
  id: string;
12
13
  username: string;
14
+ display_name?: string | null;
13
15
  email: string | null;
14
16
  role: "user" | "owner";
15
17
  known: boolean;
package/static/sdk.js CHANGED
@@ -372,7 +372,16 @@
372
372
  var databaseConnectors = dataConnectors;
373
373
 
374
374
  // src/design-system.ts
375
- var designSystem = () => track("design-system", "designSystem()", () => call("GET", "/config/design-system"));
375
+ var designSystem = () => track("design-system", "designSystem()", async () => {
376
+ const response = await call("GET", "/config/design-system");
377
+ if (typeof response === "string") return response;
378
+ if (response && typeof response === "object") {
379
+ const body = response;
380
+ if (typeof body.markdown === "string") return body.markdown;
381
+ if (typeof body.text === "function") return body.text();
382
+ }
383
+ throw new Error("Design system response did not include markdown.");
384
+ });
376
385
 
377
386
  // src/files.ts
378
387
  var files = {
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- require('../lib/tsc.js')
@@ -1,79 +0,0 @@
1
- #!/usr/bin/env node
2
- import { performance } from 'node:perf_hooks'
3
- import module from 'node:module'
4
-
5
- if (!import.meta.url.includes('node_modules')) {
6
- if (!process.env.DEBUG_DISABLE_SOURCE_MAP) {
7
- // eslint-disable-next-line n/no-unsupported-features/node-builtins -- only used in dev
8
- process.setSourceMapsEnabled(true)
9
- }
10
-
11
- process.on('unhandledRejection', (err) => {
12
- throw new Error('UNHANDLED PROMISE REJECTION', { cause: err })
13
- })
14
- }
15
-
16
- global.__vite_start_time = performance.now()
17
-
18
- // check debug mode first before requiring the CLI.
19
- const debugIndex = process.argv.findIndex((arg) => /^(?:-d|--debug)$/.test(arg))
20
- const filterIndex = process.argv.findIndex((arg) =>
21
- /^(?:-f|--filter)$/.test(arg),
22
- )
23
- const profileIndex = process.argv.indexOf('--profile')
24
-
25
- if (debugIndex > 0) {
26
- let value = process.argv[debugIndex + 1]
27
- if (!value || value[0] === '-') {
28
- value = 'vite:*'
29
- } else {
30
- // support debugging multiple flags with comma-separated list
31
- value = value
32
- .split(',')
33
- .map((v) => `vite:${v}`)
34
- .join(',')
35
- }
36
- process.env.DEBUG = `${
37
- process.env.DEBUG ? process.env.DEBUG + ',' : ''
38
- }${value}`
39
-
40
- if (filterIndex > 0) {
41
- const filter = process.argv[filterIndex + 1]
42
- if (filter && filter[0] !== '-') {
43
- process.env.VITE_DEBUG_FILTER = filter
44
- }
45
- }
46
- }
47
-
48
- function start() {
49
- try {
50
- // eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.8.0+ and only called if it exists
51
- module.enableCompileCache?.()
52
- // flush the cache after 10s because the cache is not flushed until process end
53
- // for dev server, the cache is never flushed unless manually flushed because the process.exit is called
54
- // also flushing the cache in SIGINT handler seems to cause the process to hang
55
- setTimeout(() => {
56
- try {
57
- // eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.12.0+ and only called if it exists
58
- module.flushCompileCache?.()
59
- } catch {}
60
- }, 10 * 1000).unref()
61
- } catch {}
62
- return import('../dist/node/cli.js')
63
- }
64
-
65
- if (profileIndex > 0) {
66
- process.argv.splice(profileIndex, 1)
67
- const next = process.argv[profileIndex]
68
- if (next && next[0] !== '-') {
69
- process.argv.splice(profileIndex, 1)
70
- }
71
- const inspector = await import('node:inspector').then((r) => r.default)
72
- const session = (global.__vite_profile_session = new inspector.Session())
73
- session.connect()
74
- session.post('Profiler.enable', () => {
75
- session.post('Profiler.start', start)
76
- })
77
- } else {
78
- start()
79
- }