@cedarjs/internal 0.2.0 → 0.3.0
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/files.d.ts +6 -1
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +11 -4
- package/package.json +7 -7
package/dist/files.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Options as FastGlobOptions } from 'fast-glob';
|
|
1
2
|
export declare const findCells: (cwd?: string) => string[];
|
|
2
3
|
export declare const findPages: (cwd?: string) => string[];
|
|
3
4
|
/**
|
|
@@ -18,7 +19,11 @@ export declare const findGraphQLSchemas: (cwd?: string) => string[];
|
|
|
18
19
|
export declare const findApiFiles: (cwd?: string) => string[];
|
|
19
20
|
export declare const findWebFiles: (cwd?: string) => string[];
|
|
20
21
|
export declare const findApiServerFunctions: (cwd?: string) => string[];
|
|
21
|
-
export declare const findApiDistFunctions: (
|
|
22
|
+
export declare const findApiDistFunctions: (params: {
|
|
23
|
+
cwd: string;
|
|
24
|
+
options?: FastGlobOptions;
|
|
25
|
+
discoverFunctionsGlob?: string | string[];
|
|
26
|
+
}) => string[];
|
|
22
27
|
export declare const findRouteHooksSrc: (cwd?: string) => string[];
|
|
23
28
|
export declare const isCellFile: (p: string) => boolean;
|
|
24
29
|
export declare const findScripts: (cwd?: string) => string[];
|
package/dist/files.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/files.ts"],"names":[],"mappings":"AAEA,OAAW,EAAE,KAAK,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAM/D,eAAO,MAAM,SAAS,SAAS,MAAM,aAOpC,CAAA;AAED,eAAO,MAAM,SAAS,SAAS,MAAM,aAQpC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,SAAS,MAAM,aAUpD,CAAA;AAED,eAAO,MAAM,kBAAkB,SAAS,MAAM,aAI7C,CAAA;AASD,eAAO,MAAM,YAAY,SAAS,MAAM,aAOvC,CAAA;AAED,eAAO,MAAM,YAAY,SAAS,MAAM,aAYvC,CAAA;AAED,eAAO,MAAM,sBAAsB,SAC5B,MAAM,aAUZ,CAAA;AAMD,eAAO,MAAM,oBAAoB,WAAY;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAC1C,aAcA,CAAA;AAED,eAAO,MAAM,iBAAiB,SAAS,MAAM,aAK5C,CAAA;AAED,eAAO,MAAM,UAAU,MAAO,MAAM,YA6BnC,CAAA;AAED,eAAO,MAAM,WAAW,SAAS,MAAM,aAMtC,CAAA;AAED,eAAO,MAAM,UAAU,MAAO,MAAM,YAoBnC,CAAA;AACD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,MAAO,MAAM,YAGnD,CAAA;AAED,eAAO,MAAM,mBAAmB,MAAO,MAAM,YAQ5C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,MAAO,MAAM,iBAAiB,MAAM,YAc7D,CAAA;AAED,eAAO,MAAM,kBAAkB,aAAc,MAAM,cAAc,MAAM,YAYtE,CAAA"}
|
package/dist/files.js
CHANGED
|
@@ -114,12 +114,19 @@ const findApiServerFunctions = (cwd = (0, import_project_config.getPaths)().api.
|
|
|
114
114
|
});
|
|
115
115
|
return files.filter((f) => isApiFunction(f, cwd));
|
|
116
116
|
};
|
|
117
|
-
const findApiDistFunctions = (
|
|
118
|
-
|
|
117
|
+
const findApiDistFunctions = (params) => {
|
|
118
|
+
const {
|
|
119
|
+
cwd = (0, import_project_config.getPaths)().api.base,
|
|
120
|
+
options = {},
|
|
121
|
+
discoverFunctionsGlob = "dist/functions/**/*.{ts,js}"
|
|
122
|
+
} = params;
|
|
123
|
+
return import_fast_glob.default.sync(discoverFunctionsGlob, {
|
|
119
124
|
cwd,
|
|
125
|
+
// We don't support deeply nested api functions, to maximise compatibility
|
|
126
|
+
// with deployment providers
|
|
120
127
|
deep: 2,
|
|
121
|
-
|
|
122
|
-
|
|
128
|
+
absolute: true,
|
|
129
|
+
...options
|
|
123
130
|
});
|
|
124
131
|
};
|
|
125
132
|
const findRouteHooksSrc = (cwd = (0, import_project_config.getPaths)().web.src) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/internal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"@babel/plugin-transform-typescript": "^7.26.8",
|
|
81
81
|
"@babel/runtime-corejs3": "7.27.6",
|
|
82
82
|
"@babel/traverse": "7.27.4",
|
|
83
|
-
"@cedarjs/babel-config": "0.
|
|
84
|
-
"@cedarjs/graphql-server": "0.
|
|
85
|
-
"@cedarjs/project-config": "0.
|
|
86
|
-
"@cedarjs/router": "0.
|
|
83
|
+
"@cedarjs/babel-config": "0.3.0",
|
|
84
|
+
"@cedarjs/graphql-server": "0.3.0",
|
|
85
|
+
"@cedarjs/project-config": "0.3.0",
|
|
86
|
+
"@cedarjs/router": "0.3.0",
|
|
87
87
|
"@graphql-codegen/add": "4.0.1",
|
|
88
88
|
"@graphql-codegen/cli": "3.3.1",
|
|
89
89
|
"@graphql-codegen/client-preset": "4.3.3",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
118
|
"@arethetypeswrong/cli": "0.18.1",
|
|
119
|
-
"@cedarjs/framework-tools": "0.
|
|
119
|
+
"@cedarjs/framework-tools": "0.3.0",
|
|
120
120
|
"@types/fs-extra": "11.0.4",
|
|
121
121
|
"concurrently": "8.2.2",
|
|
122
122
|
"graphql-tag": "2.12.6",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"publishConfig": {
|
|
128
128
|
"access": "public"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "ebf827bba666cc5a129823079056d0b0e8280aad"
|
|
131
131
|
}
|