create-faas-app 8.0.0-beta.13 → 8.0.0-beta.14
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/dist/index.cjs +11 -54
- package/dist/index.mjs +4 -42
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -7,16 +7,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
20
16
|
}
|
|
21
17
|
return to;
|
|
22
18
|
};
|
|
@@ -24,7 +20,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
20
|
value: mod,
|
|
25
21
|
enumerable: true
|
|
26
22
|
}) : target, mod));
|
|
27
|
-
|
|
28
23
|
//#endregion
|
|
29
24
|
let commander = require("commander");
|
|
30
25
|
let node_child_process = require("node:child_process");
|
|
@@ -32,10 +27,8 @@ let node_fs = require("node:fs");
|
|
|
32
27
|
let node_path = require("node:path");
|
|
33
28
|
let enquirer = require("enquirer");
|
|
34
29
|
enquirer = __toESM(enquirer);
|
|
35
|
-
|
|
36
30
|
//#region package.json
|
|
37
|
-
var version = "8.0.0-beta.
|
|
38
|
-
|
|
31
|
+
var version = "8.0.0-beta.13";
|
|
39
32
|
//#endregion
|
|
40
33
|
//#region src/action.ts
|
|
41
34
|
const prompt = enquirer.default.prompt;
|
|
@@ -60,28 +53,21 @@ function buildPackageJSON(name) {
|
|
|
60
53
|
build: "vite build",
|
|
61
54
|
start: "node --import @faasjs/node-utils/register-hooks server.ts",
|
|
62
55
|
check: "faas lint",
|
|
63
|
-
test: "vitest run"
|
|
64
|
-
"migrate:latest": "faas knex latest",
|
|
65
|
-
"migrate:rollback": "faas knex rollback",
|
|
66
|
-
"migrate:status": "faas knex status",
|
|
67
|
-
"migrate:current": "faas knex current",
|
|
68
|
-
"migrate:make": "faas knex make"
|
|
56
|
+
test: "vitest run"
|
|
69
57
|
},
|
|
70
58
|
dependencies: {
|
|
71
59
|
"@faasjs/core": "*",
|
|
72
|
-
pg: "*",
|
|
73
60
|
react: "*",
|
|
74
61
|
"react-dom": "*"
|
|
75
62
|
},
|
|
76
63
|
devDependencies: {
|
|
77
|
-
"@electric-sql/pglite": "*",
|
|
78
64
|
"@faasjs/dev": "*",
|
|
79
65
|
"@types/node": "*",
|
|
80
66
|
"@types/react": "*",
|
|
81
67
|
"@types/react-dom": "*",
|
|
82
68
|
"@vitejs/plugin-react": "*",
|
|
83
69
|
jsdom: "*",
|
|
84
|
-
|
|
70
|
+
oxfmt: "*",
|
|
85
71
|
oxlint: "*",
|
|
86
72
|
typescript: "*",
|
|
87
73
|
vite: "*",
|
|
@@ -94,7 +80,6 @@ function scaffold(rootPath) {
|
|
|
94
80
|
writeFile((0, node_path.join)(rootPath, ".gitignore"), `node_modules/
|
|
95
81
|
dist/
|
|
96
82
|
coverage/
|
|
97
|
-
.pglite_dev/
|
|
98
83
|
`);
|
|
99
84
|
writeFile((0, node_path.join)(rootPath, "tsconfig.json"), `{
|
|
100
85
|
"compilerOptions": {
|
|
@@ -169,33 +154,7 @@ new Server(join(__dirname, 'src'), {
|
|
|
169
154
|
secure: false
|
|
170
155
|
session:
|
|
171
156
|
secret: secret
|
|
172
|
-
knex:
|
|
173
|
-
config:
|
|
174
|
-
client: pg
|
|
175
|
-
pool:
|
|
176
|
-
min: 0
|
|
177
|
-
max: 10
|
|
178
|
-
migrations:
|
|
179
|
-
directory: ./src/db/migrations
|
|
180
|
-
extension: ts
|
|
181
|
-
development:
|
|
182
|
-
plugins:
|
|
183
|
-
knex:
|
|
184
|
-
config:
|
|
185
|
-
client: pglite
|
|
186
|
-
connection: ./.pglite_dev
|
|
187
|
-
testing:
|
|
188
|
-
plugins:
|
|
189
|
-
knex:
|
|
190
|
-
config:
|
|
191
|
-
client: pglite
|
|
192
|
-
production:
|
|
193
|
-
plugins:
|
|
194
|
-
knex:
|
|
195
|
-
config:
|
|
196
|
-
client: pg
|
|
197
157
|
`);
|
|
198
|
-
writeFile((0, node_path.join)(rootPath, "src", "db", "migrations", ".gitkeep"), "");
|
|
199
158
|
writeFile((0, node_path.join)(rootPath, "src", "main.tsx"), `import { createRoot } from 'react-dom/client'
|
|
200
159
|
import HomePage from './pages/home'
|
|
201
160
|
|
|
@@ -307,7 +266,6 @@ async function action(options = {}) {
|
|
|
307
266
|
function action_default(program) {
|
|
308
267
|
program.description("Create a new faas app").on("--help", () => console.log("Examples:\nnpx create-faas-app")).option("--name <name>", "Project name").action(action);
|
|
309
268
|
}
|
|
310
|
-
|
|
311
269
|
//#endregion
|
|
312
270
|
//#region src/index.ts
|
|
313
271
|
/**
|
|
@@ -340,6 +298,5 @@ async function main(argv) {
|
|
|
340
298
|
}
|
|
341
299
|
return commander$1;
|
|
342
300
|
}
|
|
343
|
-
|
|
344
301
|
//#endregion
|
|
345
|
-
exports.main = main;
|
|
302
|
+
exports.main = main;
|
package/dist/index.mjs
CHANGED
|
@@ -3,10 +3,8 @@ import { execSync } from "node:child_process";
|
|
|
3
3
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import enquirer from "enquirer";
|
|
6
|
-
|
|
7
6
|
//#region package.json
|
|
8
|
-
var version = "8.0.0-beta.
|
|
9
|
-
|
|
7
|
+
var version = "8.0.0-beta.13";
|
|
10
8
|
//#endregion
|
|
11
9
|
//#region src/action.ts
|
|
12
10
|
const prompt = enquirer.prompt;
|
|
@@ -31,28 +29,21 @@ function buildPackageJSON(name) {
|
|
|
31
29
|
build: "vite build",
|
|
32
30
|
start: "node --import @faasjs/node-utils/register-hooks server.ts",
|
|
33
31
|
check: "faas lint",
|
|
34
|
-
test: "vitest run"
|
|
35
|
-
"migrate:latest": "faas knex latest",
|
|
36
|
-
"migrate:rollback": "faas knex rollback",
|
|
37
|
-
"migrate:status": "faas knex status",
|
|
38
|
-
"migrate:current": "faas knex current",
|
|
39
|
-
"migrate:make": "faas knex make"
|
|
32
|
+
test: "vitest run"
|
|
40
33
|
},
|
|
41
34
|
dependencies: {
|
|
42
35
|
"@faasjs/core": "*",
|
|
43
|
-
pg: "*",
|
|
44
36
|
react: "*",
|
|
45
37
|
"react-dom": "*"
|
|
46
38
|
},
|
|
47
39
|
devDependencies: {
|
|
48
|
-
"@electric-sql/pglite": "*",
|
|
49
40
|
"@faasjs/dev": "*",
|
|
50
41
|
"@types/node": "*",
|
|
51
42
|
"@types/react": "*",
|
|
52
43
|
"@types/react-dom": "*",
|
|
53
44
|
"@vitejs/plugin-react": "*",
|
|
54
45
|
jsdom: "*",
|
|
55
|
-
|
|
46
|
+
oxfmt: "*",
|
|
56
47
|
oxlint: "*",
|
|
57
48
|
typescript: "*",
|
|
58
49
|
vite: "*",
|
|
@@ -65,7 +56,6 @@ function scaffold(rootPath) {
|
|
|
65
56
|
writeFile(join(rootPath, ".gitignore"), `node_modules/
|
|
66
57
|
dist/
|
|
67
58
|
coverage/
|
|
68
|
-
.pglite_dev/
|
|
69
59
|
`);
|
|
70
60
|
writeFile(join(rootPath, "tsconfig.json"), `{
|
|
71
61
|
"compilerOptions": {
|
|
@@ -140,33 +130,7 @@ new Server(join(__dirname, 'src'), {
|
|
|
140
130
|
secure: false
|
|
141
131
|
session:
|
|
142
132
|
secret: secret
|
|
143
|
-
knex:
|
|
144
|
-
config:
|
|
145
|
-
client: pg
|
|
146
|
-
pool:
|
|
147
|
-
min: 0
|
|
148
|
-
max: 10
|
|
149
|
-
migrations:
|
|
150
|
-
directory: ./src/db/migrations
|
|
151
|
-
extension: ts
|
|
152
|
-
development:
|
|
153
|
-
plugins:
|
|
154
|
-
knex:
|
|
155
|
-
config:
|
|
156
|
-
client: pglite
|
|
157
|
-
connection: ./.pglite_dev
|
|
158
|
-
testing:
|
|
159
|
-
plugins:
|
|
160
|
-
knex:
|
|
161
|
-
config:
|
|
162
|
-
client: pglite
|
|
163
|
-
production:
|
|
164
|
-
plugins:
|
|
165
|
-
knex:
|
|
166
|
-
config:
|
|
167
|
-
client: pg
|
|
168
133
|
`);
|
|
169
|
-
writeFile(join(rootPath, "src", "db", "migrations", ".gitkeep"), "");
|
|
170
134
|
writeFile(join(rootPath, "src", "main.tsx"), `import { createRoot } from 'react-dom/client'
|
|
171
135
|
import HomePage from './pages/home'
|
|
172
136
|
|
|
@@ -278,7 +242,6 @@ async function action(options = {}) {
|
|
|
278
242
|
function action_default(program) {
|
|
279
243
|
program.description("Create a new faas app").on("--help", () => console.log("Examples:\nnpx create-faas-app")).option("--name <name>", "Project name").action(action);
|
|
280
244
|
}
|
|
281
|
-
|
|
282
245
|
//#endregion
|
|
283
246
|
//#region src/index.ts
|
|
284
247
|
/**
|
|
@@ -311,6 +274,5 @@ async function main(argv) {
|
|
|
311
274
|
}
|
|
312
275
|
return commander;
|
|
313
276
|
}
|
|
314
|
-
|
|
315
277
|
//#endregion
|
|
316
|
-
export { main };
|
|
278
|
+
export { main };
|