@cedarjs/api-server 1.0.0-canary.12779 → 1.0.0-canary.12781
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/cjs/watch.d.ts +1 -1
- package/dist/cjs/watch.d.ts.map +1 -1
- package/dist/cjs/watch.js +23 -20
- package/dist/watch.d.ts +1 -1
- package/dist/watch.d.ts.map +1 -1
- package/dist/watch.js +24 -21
- package/package.json +9 -9
package/dist/cjs/watch.d.ts
CHANGED
package/dist/cjs/watch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/watch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/watch.ts"],"names":[],"mappings":"AAuEA;;;;GAIG;AACH,wBAAsB,UAAU,kBA+E/B"}
|
package/dist/cjs/watch.js
CHANGED
|
@@ -251,30 +251,33 @@ async function validateSdls() {
|
|
|
251
251
|
return false;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
254
|
+
async function startWatch() {
|
|
255
|
+
const dbDir = await (0, import_project_config2.getDbDir)(cedarPaths.api.prismaConfig);
|
|
256
|
+
const ignoredApiPaths = [
|
|
257
|
+
// use this, because using cedarPaths.api.dist seems to not ignore on first
|
|
258
|
+
// build
|
|
259
|
+
"api/dist",
|
|
260
|
+
cedarPaths.api.types,
|
|
261
|
+
dbDir
|
|
262
|
+
].map((path3) => (0, import_project_config2.ensurePosixPath)(path3));
|
|
263
|
+
const ignoredExtensions = [
|
|
264
|
+
".DS_Store",
|
|
265
|
+
".db",
|
|
266
|
+
".sqlite",
|
|
267
|
+
"-journal",
|
|
268
|
+
".test.js",
|
|
269
|
+
".test.ts",
|
|
270
|
+
".scenarios.ts",
|
|
271
|
+
".scenarios.js",
|
|
272
|
+
".d.ts",
|
|
273
|
+
".log"
|
|
274
|
+
];
|
|
261
275
|
const watcher = import_chokidar.default.watch([cedarPaths.api.src], {
|
|
262
276
|
persistent: true,
|
|
263
277
|
ignoreInitial: true,
|
|
264
278
|
ignored: (file) => {
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
".db",
|
|
268
|
-
".sqlite",
|
|
269
|
-
"-journal",
|
|
270
|
-
".test.js",
|
|
271
|
-
".test.ts",
|
|
272
|
-
".scenarios.ts",
|
|
273
|
-
".scenarios.js",
|
|
274
|
-
".d.ts",
|
|
275
|
-
".log"
|
|
276
|
-
].some((ext) => file.endsWith(ext));
|
|
277
|
-
return x;
|
|
279
|
+
const shouldIgnore = file.includes("node_modules") || ignoredApiPaths.some((ignoredPath) => file.includes(ignoredPath)) || ignoredExtensions.some((ext) => file.endsWith(ext));
|
|
280
|
+
return shouldIgnore;
|
|
278
281
|
}
|
|
279
282
|
});
|
|
280
283
|
watcher.on("ready", async () => {
|
package/dist/watch.d.ts
CHANGED
package/dist/watch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../src/watch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../src/watch.ts"],"names":[],"mappings":"AAuEA;;;;GAIG;AACH,wBAAsB,UAAU,kBA+E/B"}
|
package/dist/watch.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
rebuildApi
|
|
12
12
|
} from "@cedarjs/internal/dist/build/api";
|
|
13
13
|
import { loadAndValidateSdls } from "@cedarjs/internal/dist/validateSchema";
|
|
14
|
-
import { ensurePosixPath, getPaths as getPaths2 } from "@cedarjs/project-config";
|
|
14
|
+
import { ensurePosixPath, getPaths as getPaths2, getDbDir } from "@cedarjs/project-config";
|
|
15
15
|
|
|
16
16
|
// src/utils.ts
|
|
17
17
|
function debounce(func, wait) {
|
|
@@ -222,30 +222,33 @@ async function validateSdls() {
|
|
|
222
222
|
return false;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
225
|
+
async function startWatch() {
|
|
226
|
+
const dbDir = await getDbDir(cedarPaths.api.prismaConfig);
|
|
227
|
+
const ignoredApiPaths = [
|
|
228
|
+
// use this, because using cedarPaths.api.dist seems to not ignore on first
|
|
229
|
+
// build
|
|
230
|
+
"api/dist",
|
|
231
|
+
cedarPaths.api.types,
|
|
232
|
+
dbDir
|
|
233
|
+
].map((path3) => ensurePosixPath(path3));
|
|
234
|
+
const ignoredExtensions = [
|
|
235
|
+
".DS_Store",
|
|
236
|
+
".db",
|
|
237
|
+
".sqlite",
|
|
238
|
+
"-journal",
|
|
239
|
+
".test.js",
|
|
240
|
+
".test.ts",
|
|
241
|
+
".scenarios.ts",
|
|
242
|
+
".scenarios.js",
|
|
243
|
+
".d.ts",
|
|
244
|
+
".log"
|
|
245
|
+
];
|
|
232
246
|
const watcher = chokidar.watch([cedarPaths.api.src], {
|
|
233
247
|
persistent: true,
|
|
234
248
|
ignoreInitial: true,
|
|
235
249
|
ignored: (file) => {
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
".db",
|
|
239
|
-
".sqlite",
|
|
240
|
-
"-journal",
|
|
241
|
-
".test.js",
|
|
242
|
-
".test.ts",
|
|
243
|
-
".scenarios.ts",
|
|
244
|
-
".scenarios.js",
|
|
245
|
-
".d.ts",
|
|
246
|
-
".log"
|
|
247
|
-
].some((ext) => file.endsWith(ext));
|
|
248
|
-
return x;
|
|
250
|
+
const shouldIgnore = file.includes("node_modules") || ignoredApiPaths.some((ignoredPath) => file.includes(ignoredPath)) || ignoredExtensions.some((ext) => file.endsWith(ext));
|
|
251
|
+
return shouldIgnore;
|
|
249
252
|
}
|
|
250
253
|
});
|
|
251
254
|
watcher.on("ready", async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/api-server",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.12781+3646d1b08",
|
|
4
4
|
"description": "CedarJS's HTTP server for Serverless Functions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -107,11 +107,11 @@
|
|
|
107
107
|
"test:watch": "vitest watch"
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
|
-
"@cedarjs/context": "1.0.0-canary.
|
|
111
|
-
"@cedarjs/fastify-web": "1.0.0-canary.
|
|
112
|
-
"@cedarjs/internal": "1.0.0-canary.
|
|
113
|
-
"@cedarjs/project-config": "1.0.0-canary.
|
|
114
|
-
"@cedarjs/web-server": "1.0.0-canary.
|
|
110
|
+
"@cedarjs/context": "1.0.0-canary.12781",
|
|
111
|
+
"@cedarjs/fastify-web": "1.0.0-canary.12781",
|
|
112
|
+
"@cedarjs/internal": "1.0.0-canary.12781",
|
|
113
|
+
"@cedarjs/project-config": "1.0.0-canary.12781",
|
|
114
|
+
"@cedarjs/web-server": "1.0.0-canary.12781",
|
|
115
115
|
"@fastify/multipart": "9.0.3",
|
|
116
116
|
"@fastify/url-data": "6.0.3",
|
|
117
117
|
"ansis": "4.1.0",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"yargs": "17.7.2"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
|
-
"@cedarjs/framework-tools": "1.0.0-canary.
|
|
131
|
+
"@cedarjs/framework-tools": "1.0.0-canary.12781",
|
|
132
132
|
"@types/aws-lambda": "8.10.152",
|
|
133
133
|
"@types/dotenv-defaults": "^2.0.4",
|
|
134
134
|
"@types/qs": "6.9.16",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"vitest": "3.2.4"
|
|
142
142
|
},
|
|
143
143
|
"peerDependencies": {
|
|
144
|
-
"@cedarjs/graphql-server": "1.0.0-canary.
|
|
144
|
+
"@cedarjs/graphql-server": "1.0.0-canary.12781"
|
|
145
145
|
},
|
|
146
146
|
"peerDependenciesMeta": {
|
|
147
147
|
"@cedarjs/graphql-server": {
|
|
@@ -151,5 +151,5 @@
|
|
|
151
151
|
"publishConfig": {
|
|
152
152
|
"access": "public"
|
|
153
153
|
},
|
|
154
|
-
"gitHead": "
|
|
154
|
+
"gitHead": "3646d1b08789be1ee38792889bc71cf331de1435"
|
|
155
155
|
}
|