rajt 0.0.85 → 0.0.87
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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rajt",
|
|
3
3
|
"description": "A serverless bundler layer, fully typed for AWS Lambda (Node.js and LLRT) and Cloudflare Workers.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.87",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
7
7
|
"bin": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"cripta": "^0.1",
|
|
42
|
-
"forj": "^0.0.
|
|
42
|
+
"forj": "^0.0.10",
|
|
43
43
|
"t0n": "^0.1",
|
|
44
44
|
"@hono/node-server": "^1.19.9",
|
|
45
45
|
"@hono/standard-validator": "^0.2.2",
|
package/src/cli/commands/make.ts
CHANGED
|
@@ -11,8 +11,11 @@ export default defineCommand({
|
|
|
11
11
|
description: '📄 Create new files\n',
|
|
12
12
|
},
|
|
13
13
|
async run({ args }) {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
14
|
+
const alias = process.argv[2]?.startsWith('make:')
|
|
15
|
+
const action = alias ? process.argv[2].replace('make:', '') : process.argv[3]
|
|
16
|
+
const name = alias ? args._[0] : args._[1]
|
|
17
|
+
const binding = alias ? args._[1] : args._[2]
|
|
18
|
+
|
|
16
19
|
if (!name)
|
|
17
20
|
return error('File name is required')
|
|
18
21
|
|
|
@@ -37,8 +40,8 @@ export default defineCommand({
|
|
|
37
40
|
case 'migrate':
|
|
38
41
|
case 'migration':
|
|
39
42
|
fileName = Migrator.fileName(name)
|
|
40
|
-
const [table, create] = Migrator.guess(
|
|
41
|
-
fileName = path(fileName, 'migration')
|
|
43
|
+
const [table, create] = Migrator.guess(name)
|
|
44
|
+
fileName = path(join(binding || '', fileName), 'migration')
|
|
42
45
|
if (!fileName.endsWith('.ts')) fileName += '.ts'
|
|
43
46
|
makeFile(fileName, stub.replace(stub.migration, {
|
|
44
47
|
M_NAME: Migrator.className(name),
|
|
@@ -27,7 +27,7 @@ export default defineCommand({
|
|
|
27
27
|
const isRemote = !!args?.remote
|
|
28
28
|
|
|
29
29
|
try {
|
|
30
|
-
const migrations = await Migrator.queue()
|
|
30
|
+
const migrations = await Migrator.dir(database).queue()
|
|
31
31
|
const pending = migrations.pending
|
|
32
32
|
const migrated = migrations.migrated
|
|
33
33
|
|
package/src/cli/utils.ts
CHANGED
|
@@ -65,7 +65,8 @@ const nodeModules = [
|
|
|
65
65
|
'url', 'querystring', 'os', 'child_process', 'cluster', 'dns', 'net',
|
|
66
66
|
'tls', 'https', 'zlib', 'readline', 'repl', 'vm', 'module', 'assert',
|
|
67
67
|
'timers', 'string_decoder', 'punycode', 'perf_hooks', 'dgram', 'tty',
|
|
68
|
-
'worker_threads', 'wasi'
|
|
68
|
+
'worker_threads', 'wasi', 'process', 'diagnostics_channel', 'sqlite',
|
|
69
|
+
'async_hooks', 'console', 'fsevents',
|
|
69
70
|
].flatMap(lib => ['node:'+ lib, lib])
|
|
70
71
|
|
|
71
72
|
const dist = '.rajt/dist'
|