tungsten 0.1.72 → 0.1.73
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/Framework.d.ts.map +1 -1
- package/dist/Framework.js +11 -10
- package/dist/Servers/DevServer.d.ts +3 -0
- package/dist/Servers/DevServer.d.ts.map +1 -1
- package/dist/Servers/DevServer.js +24 -15
- package/dist/Servers/loadEnvsDev.d.ts +1 -2
- package/dist/Servers/loadEnvsDev.d.ts.map +1 -1
- package/dist/Servers/loadEnvsDev.js +5 -2
- package/dist/_client/client.js +0 -1
- package/dist/api/getApiRoutes.d.ts.map +1 -1
- package/dist/api/getApiRoutes.js +3 -1
- package/dist/api/getExport.d.ts +2 -1
- package/dist/api/getExport.d.ts.map +1 -1
- package/dist/api/getExport.js +6 -6
- package/dist/api/getExportDev.js +1 -1
- package/dist/babelPlugins/BabelFakeType.d.ts +6 -0
- package/dist/babelPlugins/BabelFakeType.d.ts.map +1 -0
- package/dist/babelPlugins/BabelFakeType.js +3 -0
- package/dist/babelPlugins/BabelTransformBindDirect.d.ts +2 -2
- package/dist/babelPlugins/BabelTransformBindDirect.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformBindDirect.js +32 -7
- package/dist/babelPlugins/BabelTransformBindVar.d.ts +2 -2
- package/dist/babelPlugins/BabelTransformBindVar.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformBindVar.js +11 -6
- package/dist/babelPlugins/BabelTransformCjsToEsm.d.ts +2 -2
- package/dist/babelPlugins/BabelTransformCjsToEsm.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformCjsToEsm.js +10 -0
- package/dist/babelPlugins/BabelTransformCjsToFunction.d.ts +2 -2
- package/dist/babelPlugins/BabelTransformCjsToFunction.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformCjsToFunction.js +3 -1
- package/dist/babelPlugins/BabelTransformCjsToFunction2.d.ts +2 -1
- package/dist/babelPlugins/BabelTransformCjsToFunction2.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformComponentState.d.ts +2 -2
- package/dist/babelPlugins/BabelTransformComponentState.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformDeproxyState.d.ts +2 -2
- package/dist/babelPlugins/BabelTransformDeproxyState.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformReactive.d.ts +2 -2
- package/dist/babelPlugins/BabelTransformReactive.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.d.ts +2 -2
- package/dist/babelPlugins/BabelTransformReactiveSvelteStyle.d.ts.map +1 -1
- package/dist/babelPlugins/BabelTransformUniqueComponents.d.ts +2 -2
- package/dist/babelPlugins/BabelTransformUniqueComponents.d.ts.map +1 -1
- package/dist/bin/commands/build.d.ts.map +1 -1
- package/dist/bin/commands/build.js +1 -1
- package/dist/env/getEnvSchemas.d.ts +3 -4
- package/dist/env/getEnvSchemas.d.ts.map +1 -1
- package/dist/env/getEnvSchemas.js +11 -7
- package/dist/getComponent.d.ts +2 -2
- package/dist/getComponent.d.ts.map +1 -1
- package/dist/getComponent.js +10 -3
- package/dist/getComponentDev.d.ts +1 -2
- package/dist/getComponentDev.d.ts.map +1 -1
- package/dist/getComponentDev.js +4 -2
- package/dist/getRoutes.d.ts +2 -2
- package/dist/getRoutes.d.ts.map +1 -1
- package/dist/getRoutes.js +9 -3
- package/dist/getRoutesDevs.d.ts +1 -2
- package/dist/getRoutesDevs.d.ts.map +1 -1
- package/dist/getRoutesDevs.js +4 -2
- package/dist/iterationQueryString.d.ts +2 -0
- package/dist/iterationQueryString.d.ts.map +1 -0
- package/dist/iterationQueryString.js +3 -0
- package/dist/makeFinalConfig.d.ts.map +1 -1
- package/dist/makeFinalConfig.js +3 -5
- package/dist/settings.d.ts +2 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +2 -1
- package/dist/staticGen/getAppRoutes.d.ts.map +1 -1
- package/dist/staticGen/getAppRoutes.js +15 -6
- package/package.json +2 -1
- package/types/modules.d.ts +7 -7
- package/dist/babelPlugins/Babel.type.d.ts +0 -2
- package/dist/babelPlugins/Babel.type.d.ts.map +0 -1
- package/dist/babelPlugins/Babel.type.js +0 -8
package/dist/Framework.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Framework.d.ts","sourceRoot":"","sources":["../src/Framework.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAA+B,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAEtG,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AA4BxD,qBAAa,SAAS;IAClB,MAAM,CAAC,EAAE,uBAAuB,CAAA;IAChC,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,gBAAgB,CAAC,EAAE,qBAAqB,CAAA;IACxC,mBAAmB,CAAC,EAAE,aAAa,CAAA;IACnC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,CAAC,EAAE,UAAU,CAAA;IAEjB,IAAI,IAAI,OAAO,CAAC,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"Framework.d.ts","sourceRoot":"","sources":["../src/Framework.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,OAAO,EAA+B,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAEtG,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AA4BxD,qBAAa,SAAS;IAClB,MAAM,CAAC,EAAE,uBAAuB,CAAA;IAChC,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,gBAAgB,CAAC,EAAE,qBAAqB,CAAA;IACxC,mBAAmB,CAAC,EAAE,aAAa,CAAA;IACnC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,CAAC,EAAE,UAAU,CAAA;IAEjB,IAAI,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAQxC,KAAK,CAAC,IAAI,EAAE,IAAI;IAmBhB,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,YAAY;IAwBhC,SAAS;YAID,aAAa;YAab,cAAc;YASd,mBAAmB;YAcnB,MAAM;IAKd,eAAe,IAAI,OAAO,CAAC,SAAS,CAAC;IAyBrC,aAAa,CAAC,MAAM,EAAE,uBAAuB;IAwH7C,gBAAgB,IAAI,OAAO,CAAC,UAAU,CAAC;CAyDhD"}
|
package/dist/Framework.js
CHANGED
|
@@ -21,8 +21,6 @@ import { throwError } from "./throwError.js";
|
|
|
21
21
|
//import { devBundle } from './build/devBundle.jsx'
|
|
22
22
|
import { existsSync, readFileSync, openSync, closeSync, writeFileSync, copyFileSync } from 'fs';
|
|
23
23
|
import { parseIni } from "./parseIni.js";
|
|
24
|
-
import sxyLoaderConfig from "../sxy-loader.config.js";
|
|
25
|
-
import { createLoad } from 'sxy-loader';
|
|
26
24
|
import { getEnvSchemas } from "./env/getEnvSchemas.js";
|
|
27
25
|
import { injectEnv } from "./env/injectEnv.js";
|
|
28
26
|
//import { ValueOf } from 'sxy-lib'
|
|
@@ -42,11 +40,12 @@ export class Framework {
|
|
|
42
40
|
_defineProperty(this, "prodServer", void 0);
|
|
43
41
|
}
|
|
44
42
|
async init() {
|
|
45
|
-
const configOrUndefined = await this.getUserConfig()
|
|
46
|
-
if (configOrUndefined === undefined) {
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
return configOrUndefined
|
|
43
|
+
// const configOrUndefined = await this.getUserConfig()
|
|
44
|
+
// if (configOrUndefined === undefined) {
|
|
45
|
+
// throwError('Framework.init()', 'config is undefined')
|
|
46
|
+
// }
|
|
47
|
+
// return configOrUndefined
|
|
48
|
+
return this.getUserConfig();
|
|
50
49
|
}
|
|
51
50
|
async build(mode) {
|
|
52
51
|
if (mode === 'dev') {
|
|
@@ -140,8 +139,10 @@ export class Framework {
|
|
|
140
139
|
const initialProcessEnv = {
|
|
141
140
|
...process.env
|
|
142
141
|
};
|
|
143
|
-
const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
144
|
-
|
|
142
|
+
//const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
143
|
+
// !REVIEW! why do we need to load envs here?
|
|
144
|
+
//await loadEnvsDev(this.config, load, initialProcessEnv, false)
|
|
145
|
+
await loadEnvsDev(this.config, -1, initialProcessEnv, false);
|
|
145
146
|
this.devServer = new DevServer(this, this.config, this.compilationInfo);
|
|
146
147
|
return this.devServer;
|
|
147
148
|
}
|
|
@@ -163,7 +164,7 @@ export class Framework {
|
|
|
163
164
|
global.tungstenPrivateEnv = {/*TUNGSTEN_SERVER_PORT: -999*/};
|
|
164
165
|
// Load schemas
|
|
165
166
|
const envSchemas = await getEnvSchemas(config);
|
|
166
|
-
let someEnvLoaded = false;
|
|
167
|
+
let someEnvLoaded = false; // eslint-disable-line no-type-assertion/no-type-assertion -- widening
|
|
167
168
|
//const envsLoadedMessages: string[] = []
|
|
168
169
|
function loadEnv(fileName, filePath, prefix = '') {
|
|
169
170
|
const env = parseIni(readFileSync(filePath, 'utf-8'));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Server } from 'http';
|
|
2
2
|
import express from 'express';
|
|
3
|
+
import 'esm-reload';
|
|
3
4
|
import type { FrameworkConfigComplete } from '../FrameworkConfig.js';
|
|
4
5
|
import type { CompilationInfo } from '../build/CompilationInfo.js';
|
|
5
6
|
import type { ApiRoutes } from '../api/ApiRoutes.js';
|
|
@@ -20,6 +21,8 @@ export declare class DevServer extends TungstenServer {
|
|
|
20
21
|
server?: Server;
|
|
21
22
|
reqId: number;
|
|
22
23
|
firstRender: boolean;
|
|
24
|
+
iterationCount: number;
|
|
25
|
+
serverIterationCount: number;
|
|
23
26
|
constructor(framework: Framework, config: FrameworkConfigComplete, compilationInfo: CompilationInfo, initialProcessEnv?: Record<string, string>);
|
|
24
27
|
private addServerMiddleware;
|
|
25
28
|
private handleRequestApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../../src/Servers/DevServer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,OAA4D,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"DevServer.d.ts","sourceRoot":"","sources":["../../src/Servers/DevServer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,OAA4D,MAAM,SAAS,CAAA;AAElF,OAAO,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,uBAAuB,EAAwB,MAAM,uBAAuB,CAAA;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAMpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAW3C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAIrC,OAAO,EAAE,UAAU,EAAkB,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAEjG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAiBrD,qBAAa,SAAU,SAAQ,cAAc;IACzC,SAAS,EAAE,SAAS,CAAA;IACpB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,eAAe,EAAE,eAAe,CAAA;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAC9B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC,GAAG,EAAE,OAAO,CAAC,WAAW,CAAA;IAExB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,OAAO,CAAO;IAC3B,cAAc,EAAE,MAAM,CAAI;IAC1B,oBAAoB,EAAE,MAAM,CAAI;gBAE5B,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,uBAAuB,EAAE,eAAe,EAAE,eAAe,EACvF,iBAAiB,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM;IAqHlD,OAAO,CAAC,mBAAmB,CAuE1B;IAKD,OAAO,CAAC,gBAAgB,CAcvB;IAED,OAAO,CAAC,aAAa,CAwMpB;IAID,aAAa,GAAU,MAAM,kBAAkB,EAAE,QAAQ,MAAM,yBAQ9D;IACD,QAAQ,GAAI,OAAO,OAAO,UAIzB;IACD,SAAS,GAAI,OAAO,OAAO,EAAE,YAAY,MAAM,EAAE,YAehD;IACD,KAAK,QAAO,OAAO,CAAC,MAAM,CAAC,CAO1B;IACD,IAAI,aAEH;CAGJ"}
|
|
@@ -3,6 +3,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
4
|
import express from 'express';
|
|
5
5
|
import { join } from 'path';
|
|
6
|
+
import 'esm-reload'; // V important ES module cache control
|
|
6
7
|
import { allObj as promiseAllObj } from 'sxy-lib/promises.js';
|
|
7
8
|
import { staticFolder, assetsFolder, publicFolder, packagesFolder, clientFolder, componentCssFolder } from "../settings.js";
|
|
8
9
|
import { rootToHtmlDev as renderRootToHtmlDev } from "../render/rootToHtmlDev.js";
|
|
@@ -17,8 +18,6 @@ import { log } from "../appOutput.js";
|
|
|
17
18
|
import { throwError } from "../throwError.js";
|
|
18
19
|
import { getRoutesDev } from "../getRoutesDevs.js";
|
|
19
20
|
import { getComponentDev } from "../getComponentDev.js";
|
|
20
|
-
import sxyLoaderConfig from "../../sxy-loader.config.js";
|
|
21
|
-
import { createLoad } from 'sxy-loader';
|
|
22
21
|
import { routing } from "./routing.js";
|
|
23
22
|
import { globalDataFunc } from "../routing/registerGlobalData.js";
|
|
24
23
|
import { TungstenServer } from "./TungstenServer.js";
|
|
@@ -26,6 +25,7 @@ import { portError } from "./portError.js";
|
|
|
26
25
|
import { loadEnvsDev } from "./loadEnvsDev.js";
|
|
27
26
|
import { initStores } from "./initStores.js";
|
|
28
27
|
import { MatchedRoute } from "../routing/MatchedRoute.js";
|
|
28
|
+
import { iterationQueryString } from "../iterationQueryString.js";
|
|
29
29
|
//import cookieParser from 'cookie-parser'
|
|
30
30
|
function debug(...texts) {
|
|
31
31
|
// console.log(...texts)
|
|
@@ -46,6 +46,8 @@ export class DevServer extends TungstenServer {
|
|
|
46
46
|
_defineProperty(this, "server", void 0);
|
|
47
47
|
_defineProperty(this, "reqId", void 0);
|
|
48
48
|
_defineProperty(this, "firstRender", true);
|
|
49
|
+
_defineProperty(this, "iterationCount", 0);
|
|
50
|
+
_defineProperty(this, "serverIterationCount", 0);
|
|
49
51
|
_defineProperty(this, "addServerMiddleware", serverMiddleware => {
|
|
50
52
|
//console.log('addServerMiddleware')
|
|
51
53
|
const [middlewareFile, middlewareExportName, middlewarePath] = serverMiddleware;
|
|
@@ -75,9 +77,10 @@ export class DevServer extends TungstenServer {
|
|
|
75
77
|
// code
|
|
76
78
|
// [*] const middlewares = await middlewaresPromise
|
|
77
79
|
try {
|
|
78
|
-
const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
80
|
+
//const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
79
81
|
const fullFilePath = 'file://' + join(this.compilationInfo.codeLocation, middlewareFile);
|
|
80
|
-
const middlewareModule = await load(fullFilePath)
|
|
82
|
+
//const middlewareModule = await load(fullFilePath)
|
|
83
|
+
const middlewareModule = await import(iterationQueryString(fullFilePath, this.serverIterationCount++));
|
|
81
84
|
if (!(middlewareExportName in middlewareModule)) {
|
|
82
85
|
throwError('DevServer', `export ${middlewareExportName} not found in ${middlewareFile}` + ` when trying to load server middleware`);
|
|
83
86
|
}
|
|
@@ -139,6 +142,7 @@ export class DevServer extends TungstenServer {
|
|
|
139
142
|
try {
|
|
140
143
|
const _firstRender = this.firstRender;
|
|
141
144
|
this.firstRender = false;
|
|
145
|
+
const iteration = this.iterationCount++;
|
|
142
146
|
//console.log('received a frontend req', req.originalUrl, res.locals.reqId)
|
|
143
147
|
//// I think we need to pass req, (res?) to the app
|
|
144
148
|
//// so that it can set response codes
|
|
@@ -156,8 +160,9 @@ export class DevServer extends TungstenServer {
|
|
|
156
160
|
throwError('DevServer.handleRequest()', 'framework.frameworkModules is undefined');
|
|
157
161
|
}
|
|
158
162
|
globalDataFunc.value = undefined;
|
|
159
|
-
const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
160
|
-
await loadEnvsDev(this.config, load, this.initialProcessEnv, false)
|
|
163
|
+
//const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
164
|
+
//await loadEnvsDev(this.config, load, this.initialProcessEnv, false)
|
|
165
|
+
await loadEnvsDev(this.config, iteration, this.initialProcessEnv, false);
|
|
161
166
|
// we are delaying instance creation until after we load the app code, to lets things initialise?
|
|
162
167
|
const reqRes = {
|
|
163
168
|
req,
|
|
@@ -167,7 +172,8 @@ export class DevServer extends TungstenServer {
|
|
|
167
172
|
const serverDataLoading = {
|
|
168
173
|
value: false
|
|
169
174
|
};
|
|
170
|
-
const routingPromise = getRoutesDev(this.compilationInfo, this.config, load).then(
|
|
175
|
+
//const routingPromise = getRoutesDev(this.compilationInfo, this.config, load).then(
|
|
176
|
+
const routingPromise = getRoutesDev(this.compilationInfo, this.config, iteration).then(async appRoutes => {
|
|
171
177
|
const routes = typeof appRoutes === 'function' ? appRoutes(reqRes) : appRoutes;
|
|
172
178
|
// load data, and do routing
|
|
173
179
|
return promiseAllObj({
|
|
@@ -217,7 +223,8 @@ export class DevServer extends TungstenServer {
|
|
|
217
223
|
RootComponentClass
|
|
218
224
|
} = await promiseAllObj({
|
|
219
225
|
routing: routingPromise,
|
|
220
|
-
RootComponentClass: getComponentDev(rootComponentFileFull, this.config.rootComponent, load)
|
|
226
|
+
//RootComponentClass: getComponentDev(rootComponentFileFull, this.config.rootComponent, load)
|
|
227
|
+
RootComponentClass: getComponentDev(rootComponentFileFull, this.config.rootComponent, iteration)
|
|
221
228
|
})
|
|
222
229
|
// .catch(e => {
|
|
223
230
|
// cliError('ROUTING AND ROOT ERR')
|
|
@@ -361,14 +368,16 @@ export class DevServer extends TungstenServer {
|
|
|
361
368
|
const targetOrigin = req.protocol + '://' + String(req.header('host'));
|
|
362
369
|
const target = targetOrigin + req.url;
|
|
363
370
|
const origin = req.header('origin');
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
371
|
+
if (tungstenPrivateEnv.DEBUG === true) {
|
|
372
|
+
// request log
|
|
373
|
+
let message = 'Received request at ' + target;
|
|
374
|
+
if (origin !== undefined) {
|
|
375
|
+
message += ' from ' + String(req.header('origin'));
|
|
376
|
+
// should we use referrer as a backup option?
|
|
377
|
+
// not sure what that is
|
|
378
|
+
}
|
|
379
|
+
cliOut(message);
|
|
370
380
|
}
|
|
371
|
-
cliOut(message);
|
|
372
381
|
if (this.config.suppressOriginMismatchWarning !== true) {
|
|
373
382
|
// origin-target mismatch warning
|
|
374
383
|
if (origin !== undefined && origin === this.location && origin !== targetOrigin) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { Load } from 'sxy-loader';
|
|
2
1
|
import type { FrameworkConfigComplete } from '../FrameworkConfig.js';
|
|
3
2
|
type ProcessEnv = {
|
|
4
3
|
[x: string]: string | undefined;
|
|
5
4
|
TZ?: string;
|
|
6
5
|
};
|
|
7
|
-
export declare function loadEnvsDev(config: FrameworkConfigComplete,
|
|
6
|
+
export declare function loadEnvsDev(config: FrameworkConfigComplete, iteration: number, initialProcessEnv: ProcessEnv, _firstLoad: boolean): Promise<void>;
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=loadEnvsDev.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadEnvsDev.d.ts","sourceRoot":"","sources":["../../src/Servers/loadEnvsDev.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadEnvsDev.d.ts","sourceRoot":"","sources":["../../src/Servers/loadEnvsDev.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAQpE,KAAK,UAAU,GAAG;IACd,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,CAAA;AAED,wBAAsB,WAAW,CAC7B,MAAM,EAAE,uBAAuB,EAE/B,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,UAAU,EAC7B,UAAU,EAAE,OAAO,iBAmGtB"}
|
|
@@ -7,12 +7,15 @@ import { cliLog, cliOut } from "../cliOutput.js";
|
|
|
7
7
|
import { injectEnv } from "../env/injectEnv.js";
|
|
8
8
|
import { throwError } from 'tungsten/throwError.js';
|
|
9
9
|
import { tungstenCorePrivateEnvSchema } from "./tungstenCorePrivateEnvSchema.js";
|
|
10
|
-
export async function loadEnvsDev(config,
|
|
10
|
+
export async function loadEnvsDev(config,
|
|
11
|
+
//load: Load,
|
|
12
|
+
iteration, initialProcessEnv, _firstLoad) {
|
|
11
13
|
//console.log('loadEnvsDev')
|
|
12
14
|
const tempEnv = {
|
|
13
15
|
...initialProcessEnv
|
|
14
16
|
};
|
|
15
|
-
const envSchemas = await getEnvSchemasDev(config, load)
|
|
17
|
+
// const envSchemas = await getEnvSchemasDev(config, load)
|
|
18
|
+
const envSchemas = await getEnvSchemasDev(config, iteration);
|
|
16
19
|
const projectDir = process.cwd();
|
|
17
20
|
const envLocation = join(projectDir, '.env');
|
|
18
21
|
const privateEnvLocation = join(projectDir, '.env.private');
|
package/dist/_client/client.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { hydrate } from 'tungsten';
|
|
3
3
|
// @ts-ignore -- ignore module not found, will be generated later
|
|
4
4
|
import instanceConfig from "../.tungsten.config.js";
|
|
5
|
-
console.log('app config', instanceConfig);
|
|
6
5
|
// wrap the async code in an async IIFE to help rollup
|
|
7
6
|
const clientPromise = (async () => {
|
|
8
7
|
//const isProd = window.__tungsten_prod__ = appConfig.prod
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getApiRoutes.d.ts","sourceRoot":"","sources":["../../src/api/getApiRoutes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAK5D,wBAAsB,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"getApiRoutes.d.ts","sourceRoot":"","sources":["../../src/api/getApiRoutes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAK5D,wBAAsB,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,sBAevG"}
|
package/dist/api/getApiRoutes.js
CHANGED
|
@@ -3,7 +3,9 @@ import { TungstenError } from "../TungstenError.js";
|
|
|
3
3
|
import { getExportDev } from "./getExportDev.js";
|
|
4
4
|
import { getExport } from "./getExport.js";
|
|
5
5
|
export async function getApiRoutes(config, compilationInfo, mode) {
|
|
6
|
-
if (typeof config.apiRoutes !== 'string')
|
|
6
|
+
if (typeof config.apiRoutes !== 'string') {
|
|
7
|
+
throw new TungstenError(`getApiRoutes() error - config.apiRoutes is not valid`);
|
|
8
|
+
}
|
|
7
9
|
const apiRoutesFileFull = join(compilationInfo.location, config.apiRoutes);
|
|
8
10
|
//console.log('rootComponentFileFull', 'xxx', 'config.rootComponent', config.rootComponent)
|
|
9
11
|
//console.log('rootComponentFileFull', apiRoutesFileFull, 'config.rootComponent', config.apiRoutes)
|
package/dist/api/getExport.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { Mode } from '../Mode.js';
|
|
2
|
+
export declare function getExport(filePath: string, relFile: string, mode?: Mode): Promise<any>;
|
|
2
3
|
//# sourceMappingURL=getExport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExport.d.ts","sourceRoot":"","sources":["../../src/api/getExport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getExport.d.ts","sourceRoot":"","sources":["../../src/api/getExport.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAOjC,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,IAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAuBpG"}
|
package/dist/api/getExport.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { createLoad } from 'sxy-loader';
|
|
2
1
|
import { basename } from 'path';
|
|
3
2
|
import { fixExtension } from "../fixExtension.js";
|
|
4
3
|
import { TungstenError } from "../TungstenError.js";
|
|
5
|
-
import
|
|
4
|
+
import { iterationQueryString } from "../iterationQueryString.js";
|
|
6
5
|
//let load //// !! future improvement
|
|
7
|
-
|
|
6
|
+
let exportIteration = 0;
|
|
7
|
+
export async function getExport(filePath, relFile, mode = 'prod') {
|
|
8
8
|
const fileName = basename(relFile);
|
|
9
9
|
filePath = 'file://' + fixExtension(filePath);
|
|
10
10
|
//console.log(filePath)
|
|
11
11
|
let module;
|
|
12
|
-
if (dev) {
|
|
12
|
+
if (mode === 'dev') {
|
|
13
13
|
//if ( ! load ) load = await createLoad(import.meta.url, sxyLoaderConfig) //// !! future improvement
|
|
14
|
-
const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
15
|
-
module = await
|
|
14
|
+
//const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
15
|
+
module = await import(iterationQueryString(filePath, exportIteration++));
|
|
16
16
|
} else {
|
|
17
17
|
module = await import(filePath); // import the module
|
|
18
18
|
}
|
package/dist/api/getExportDev.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BabelFakeType.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelFakeType.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,MAAM,MAAM,SAAS,GAAG;IACpB,KAAK,EAAE,GAAG,CAAA;IACV,KAAK,EAAE,OAAO,KAAK,CAAA;CACtB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Babel } from './Babel.type.js';
|
|
2
1
|
import { NodePath, types } from '@babel/core';
|
|
3
|
-
|
|
2
|
+
import { BabelFake } from './BabelFakeType.js';
|
|
3
|
+
export declare function MakeBabelTransformBindDirect(): (babel: BabelFake) => {
|
|
4
4
|
name: string;
|
|
5
5
|
visitor: {
|
|
6
6
|
JSXAttribute(path: NodePath<types.JSXAttribute>, state: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformBindDirect.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformBindDirect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BabelTransformBindDirect.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformBindDirect.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AA0C9C,wBAAgB,4BAA4B,KACC,OAAO,SAAS;;;2BAK1B,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,SAAS,GAAG;;EAmT1E"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//import { T } from '@babel/core'
|
|
2
2
|
import { TungstenError } from "../TungstenError.js";
|
|
3
|
+
import { throwError } from "../throwError.js";
|
|
3
4
|
// BabelTransformBind
|
|
4
5
|
// exports MakeBabelTransformBind (function)
|
|
5
6
|
//
|
|
@@ -116,15 +117,28 @@ export function MakeBabelTransformBindDirect(/*opts: Opts*/
|
|
|
116
117
|
for (const att of parent.attributes) {
|
|
117
118
|
if (att.type === 'JSXAttribute') {
|
|
118
119
|
if (att.name.name === 'onChange') {
|
|
119
|
-
|
|
120
|
+
if (att.value === undefined) {
|
|
121
|
+
throwError('BabelTransformBindDirect', 'attribute value is undefined');
|
|
122
|
+
}
|
|
123
|
+
if (att.value === null) {
|
|
124
|
+
throwError('BabelTransformBindDirect', 'attribute value is null');
|
|
125
|
+
}
|
|
126
|
+
originalOnChange = make.ExpressionStatement(make.CallExpression(
|
|
127
|
+
// @ts-expect-error
|
|
128
|
+
att.value.expression, [make.Identifier('event'), make.Identifier('value')]));
|
|
120
129
|
}
|
|
121
130
|
if (att.name.name === 'filter') {
|
|
122
|
-
filter = make.VariableDeclaration('const', [make.VariableDeclarator(make.Identifier('value'), make.CallExpression(
|
|
131
|
+
filter = make.VariableDeclaration('const', [make.VariableDeclarator(make.Identifier('value'), make.CallExpression(
|
|
132
|
+
// @ts-expect-error
|
|
133
|
+
att.value.expression, [make.MemberExpression(make.MemberExpression(make.Identifier('event'), make.Identifier('target')), make.Identifier('value')), make.Identifier('event')]))]);
|
|
123
134
|
}
|
|
124
135
|
}
|
|
125
136
|
}
|
|
126
137
|
// remove the original onChange attribute(s)
|
|
127
|
-
|
|
138
|
+
// @ts-expect-error
|
|
139
|
+
path.parent.attributes = path.parent.attributes.filter(
|
|
140
|
+
// @ts-expect-error
|
|
141
|
+
att => att.type !== 'JSXAttribute' || att.name.name !== 'onChange' && att.name.name !== 'filter');
|
|
128
142
|
const stateSettingMode = 'assignment';
|
|
129
143
|
let setStateExpression;
|
|
130
144
|
let stateAssignmentExpression;
|
|
@@ -135,11 +149,20 @@ export function MakeBabelTransformBindDirect(/*opts: Opts*/
|
|
|
135
149
|
} else {
|
|
136
150
|
//// unused
|
|
137
151
|
//// would only be useful for a back compat mode
|
|
152
|
+
// @ts-expect-error
|
|
138
153
|
if (variableParts.length === 3) {
|
|
139
|
-
|
|
154
|
+
// eslint-disable-line @typescript-eslint/no-unnecessary-condition
|
|
155
|
+
setStateExpression = make.ExpressionStatement(make.CallExpression(make.MemberExpression(make.Identifier('this'), make.Identifier('setState')), [make.ObjectExpression([make.ObjectProperty(
|
|
156
|
+
// @ts-expect-error
|
|
157
|
+
make.StringLiteral(variableParts[2].property.name), make.Identifier('value'))])]));
|
|
140
158
|
} else {
|
|
141
159
|
setStateExpression = make.ExpressionStatement(make.CallExpression(make.MemberExpression(make.Identifier('this'), make.Identifier('setStateDeep')), [make.ArrayExpression(variableParts.filter((p, k) => k >= 2).map(p => {
|
|
142
|
-
|
|
160
|
+
// @ts-expect-error
|
|
161
|
+
return !p.computed // eslint-disable-line @typescript-eslint/strict-boolean-expressions
|
|
162
|
+
// @ts-expect-error
|
|
163
|
+
? make.StringLiteral(p.property.name)
|
|
164
|
+
// @ts-expect-error
|
|
165
|
+
: p.property;
|
|
143
166
|
})), make.Identifier('value')]));
|
|
144
167
|
}
|
|
145
168
|
}
|
|
@@ -148,7 +171,8 @@ export function MakeBabelTransformBindDirect(/*opts: Opts*/
|
|
|
148
171
|
}
|
|
149
172
|
const functionBodyExpressions = [];
|
|
150
173
|
const assignToValueVarExpression = make.VariableDeclaration('const', [make.VariableDeclarator(make.Identifier('value'), make.MemberExpression(make.MemberExpression(make.Identifier('event'), make.Identifier('target')), make.Identifier('value')))]);
|
|
151
|
-
if (filter) functionBodyExpressions.push(filter);
|
|
174
|
+
if (filter) functionBodyExpressions.push(filter); // eslint-disable-line @typescript-eslint/strict-boolean-expressions
|
|
175
|
+
else functionBodyExpressions.push(assignToValueVarExpression);
|
|
152
176
|
if (stateBased) {
|
|
153
177
|
if (stateSettingMode === 'assignment') {
|
|
154
178
|
functionBodyExpressions.push(stateAssignmentExpression);
|
|
@@ -158,8 +182,9 @@ export function MakeBabelTransformBindDirect(/*opts: Opts*/
|
|
|
158
182
|
functionBodyExpressions.push(setStateExpression);
|
|
159
183
|
}
|
|
160
184
|
} else functionBodyExpressions.push(setFieldExpression);
|
|
161
|
-
if (originalOnChange) functionBodyExpressions.push(originalOnChange);
|
|
185
|
+
if (originalOnChange) functionBodyExpressions.push(originalOnChange); // eslint-disable-line @typescript-eslint/strict-boolean-expressions
|
|
162
186
|
const attr = make.JSXAttribute(make.JSXIdentifier('onKeyUp'), make.JSXExpressionContainer(make.ArrowFunctionExpression([make.Identifier('event')], make.BlockStatement(functionBodyExpressions))));
|
|
187
|
+
// @ts-expect-error
|
|
163
188
|
path.parent.attributes.push(attr);
|
|
164
189
|
}
|
|
165
190
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BabelFake } from './BabelFakeType.js';
|
|
2
2
|
import { NodePath, types } from '@babel/core';
|
|
3
|
-
export declare function MakeBabelTransformBindVar(): (babel:
|
|
3
|
+
export declare function MakeBabelTransformBindVar(): (babel: BabelFake) => {
|
|
4
4
|
name: string;
|
|
5
5
|
visitor: {
|
|
6
6
|
JSXAttribute(path: NodePath<types.JSXAttribute>, state: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformBindVar.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformBindVar.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BabelTransformBindVar.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformBindVar.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAS,MAAM,aAAa,CAAA;AA0FpD,wBAAgB,yBAAyB,KACC,OAAO,SAAS;;;2BAKvB,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,SAAS,GAAG;;EA4Q1E"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//import { T } from '@babel/core'
|
|
2
2
|
import { TungstenError } from "../TungstenError.js";
|
|
3
|
-
import { bindableHtmlElements } from "../
|
|
3
|
+
import { bindableHtmlElements } from "../components/bindable/bindableHtmlElements.js";
|
|
4
|
+
import { throwError } from "../throwError.js";
|
|
4
5
|
// BabelTransformBind
|
|
5
6
|
// exports MakeBabelTransformBind (function)
|
|
6
7
|
//
|
|
@@ -82,11 +83,14 @@ export function MakeBabelTransformBindVar(/*opts: Opts*/
|
|
|
82
83
|
}
|
|
83
84
|
const bindVarObjectExpression = bindVarTuple.elements[0];
|
|
84
85
|
const bindVarPropExpression = bindVarTuple.elements[1];
|
|
86
|
+
// @ts-expect-error
|
|
85
87
|
if (!TupleElementIsIdentifierOrMemberExpressionOrCallExpression(bindVarObjectExpression)) {
|
|
86
|
-
|
|
88
|
+
throwError('BabelTransformBindVar', 'The first element in the bind prop tuple must be a variable or function call');
|
|
87
89
|
}
|
|
88
|
-
if (!TupleElementIsIdentifierOrStringLiteralOrTaggedTemplateExpressionOrCallExpression(
|
|
89
|
-
|
|
90
|
+
if (!TupleElementIsIdentifierOrStringLiteralOrTaggedTemplateExpressionOrCallExpression(
|
|
91
|
+
// @ts-expect-error
|
|
92
|
+
bindVarPropExpression)) {
|
|
93
|
+
throwError('BabelTransformBindVar', 'The second element in the bind prop tuple must be a string, variable, or function call');
|
|
90
94
|
}
|
|
91
95
|
//// determine whether the bind object is within component state
|
|
92
96
|
/*
|
|
@@ -196,7 +200,8 @@ export function MakeBabelTransformBindVar(/*opts: Opts*/
|
|
|
196
200
|
// }
|
|
197
201
|
const functionBodyExpressions = [];
|
|
198
202
|
const assignToValueVarExpression = make.VariableDeclaration('const', [make.VariableDeclarator(make.Identifier('value'), make.MemberExpression(make.MemberExpression(make.Identifier('event'), make.Identifier('target')), make.Identifier('value')))]);
|
|
199
|
-
if (filter) functionBodyExpressions.push(filter);
|
|
203
|
+
if (filter) functionBodyExpressions.push(filter); // eslint-disable-line @typescript-eslint/strict-boolean-expressions
|
|
204
|
+
else functionBodyExpressions.push(assignToValueVarExpression);
|
|
200
205
|
// if (stateBased) {
|
|
201
206
|
// if (stateSettingMode === 'assignment') {
|
|
202
207
|
// functionBodyExpressions.push(stateAssignmentExpression)
|
|
@@ -208,7 +213,7 @@ export function MakeBabelTransformBindVar(/*opts: Opts*/
|
|
|
208
213
|
// }
|
|
209
214
|
// else functionBodyExpressions.push(setFieldExpression)
|
|
210
215
|
functionBodyExpressions.push(assignmentExpression);
|
|
211
|
-
if (originalOnChange) functionBodyExpressions.push(originalOnChange);
|
|
216
|
+
if (originalOnChange) functionBodyExpressions.push(originalOnChange); // eslint-disable-line @typescript-eslint/strict-boolean-expressions
|
|
212
217
|
const attr = make.JSXAttribute(make.JSXIdentifier('onKeyUp'), make.JSXExpressionContainer(make.ArrowFunctionExpression([make.Identifier('event')], make.BlockStatement(functionBodyExpressions))));
|
|
213
218
|
openingElement.attributes.push(attr);
|
|
214
219
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NodePath, types } from '@babel/core';
|
|
2
|
-
import type {
|
|
3
|
-
export declare function MakeBabelTransformCjsToEsm(): (babel:
|
|
2
|
+
import type { BabelFake } from './BabelFakeType.js';
|
|
3
|
+
export declare function MakeBabelTransformCjsToEsm(): (babel: BabelFake) => {
|
|
4
4
|
pre(state: any): void;
|
|
5
5
|
visitor: {
|
|
6
6
|
CallExpression(path: NodePath<types.CallExpression>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformCjsToEsm.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformCjsToEsm.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BabelTransformCjsToEsm.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformCjsToEsm.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAqEnD,wBAAgB,0BAA0B,KACC,OAAO,SAAS;eAapC,GAAG;;6BAmBW,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC;yBAwBlC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC;+BAMpB,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC;;gBAU/C,OAAO;EAmG9B"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { readFileSync } from 'fs';
|
|
3
3
|
import { createRequire } from 'module';
|
|
4
4
|
import { init as lexerInit, parse as lexerParse } from 'cjs-module-lexer';
|
|
5
|
+
import { throwError } from "../throwError.js";
|
|
5
6
|
lexerInit();
|
|
6
7
|
const filenameAndDirnameCode = `import { fileURLToPath } from 'url';
|
|
7
8
|
import { dirname } from 'path';
|
|
@@ -32,6 +33,7 @@ function getExportNamesFromCode(code, filename) {
|
|
|
32
33
|
const _require = createRequire(filename);
|
|
33
34
|
const target = _require.resolve(reExport);
|
|
34
35
|
const secondaryNames = getExportNamesFromFile(target);
|
|
36
|
+
if (secondaryNames === undefined) throwError('getExportNamesFromCode', 'secondaryNames is undefined');
|
|
35
37
|
for (const e of secondaryNames) {
|
|
36
38
|
combinedExports[e] = true;
|
|
37
39
|
}
|
|
@@ -106,6 +108,7 @@ export function MakeBabelTransformCjsToEsm(/*opts: Opts*/
|
|
|
106
108
|
},
|
|
107
109
|
post(state) {
|
|
108
110
|
const importsStatement = t.VariableDeclaration('const', [t.VariableDeclarator(t.Identifier('__tungsten_cjs_to_esm_imports'), t.AwaitExpression(t.CallExpression(t.MemberExpression(t.Identifier('Promise'), t.Identifier('all')), [t.ArrayExpression(imports.map(imp => {
|
|
111
|
+
// @ts-expect-error
|
|
109
112
|
const source = imp[0].value;
|
|
110
113
|
//// We don't wanna change imports, because we need to resolve and alter them
|
|
111
114
|
//// in the next step
|
|
@@ -123,6 +126,7 @@ export function MakeBabelTransformCjsToEsm(/*opts: Opts*/
|
|
|
123
126
|
// }
|
|
124
127
|
return t.AwaitExpression(t.CallExpression(t.Import(), [t.StringLiteral(source)]));
|
|
125
128
|
}))])))]);
|
|
129
|
+
// @ts-expect-error
|
|
126
130
|
state.path.unshiftContainer('body', importsStatement);
|
|
127
131
|
//for (const imp of imports) {
|
|
128
132
|
// const importDeclaration = t.ImportDeclaration(
|
|
@@ -135,18 +139,24 @@ export function MakeBabelTransformCjsToEsm(/*opts: Opts*/
|
|
|
135
139
|
//}
|
|
136
140
|
// reverse the order, because we are unshifting
|
|
137
141
|
if (addCreateRequire) {
|
|
142
|
+
// @ts-expect-error
|
|
138
143
|
state.path.unshiftContainer('body', createRequire);
|
|
139
144
|
}
|
|
140
145
|
if (addFilenameAndDirname) {
|
|
146
|
+
// @ts-expect-error
|
|
141
147
|
state.path.unshiftContainer('body', filenameAndDirname);
|
|
142
148
|
}
|
|
149
|
+
// @ts-expect-error
|
|
143
150
|
state.path.unshiftContainer('body', exportsStart);
|
|
151
|
+
// @ts-expect-error
|
|
144
152
|
const names = getExportNamesFromCode(state.code, state.opts.filename);
|
|
145
153
|
for (const name of names) {
|
|
146
154
|
if (name === 'default') continue; /// cannot export named variables called default - this is reserved for the default export
|
|
147
155
|
const namedExport = t.ExportNamedDeclaration(t.VariableDeclaration('const', [t.VariableDeclarator(t.Identifier(name), t.MemberExpression(t.MemberExpression(t.identifier('module'), t.identifier('exports')), t.StringLiteral(name), true))]));
|
|
156
|
+
// @ts-expect-error
|
|
148
157
|
state.path.pushContainer('body', namedExport);
|
|
149
158
|
}
|
|
159
|
+
// @ts-expect-error
|
|
150
160
|
state.path.pushContainer('body', exportsEnd);
|
|
151
161
|
}
|
|
152
162
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Directive, Identifier } from 'babel-types';
|
|
2
2
|
import type { NodePath } from '@babel/core';
|
|
3
|
-
import type {
|
|
3
|
+
import type { BabelFake } from './BabelFakeType.js';
|
|
4
4
|
type Opts = {
|
|
5
5
|
dependencies: string[];
|
|
6
6
|
};
|
|
7
|
-
export declare function MakeBabelTransformCjsToFunction(opts: Opts): (babel:
|
|
7
|
+
export declare function MakeBabelTransformCjsToFunction(opts: Opts): (babel: BabelFake) => {
|
|
8
8
|
pre(state: unknown): void;
|
|
9
9
|
visitor: {
|
|
10
10
|
Identifier(path: NodePath<Identifier>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformCjsToFunction.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformCjsToFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BabelTransformCjsToFunction.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformCjsToFunction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAanD,KAAK,IAAI,GAAG;IACR,YAAY,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,IAAI,IACV,OAAO,SAAS;eASzC,OAAO;;yBAoBG,QAAQ,CAAC,UAAU,CAAC;wBAMrB,QAAQ,CAAC,SAAS,CAAC;;gBAM3B,GAAG;EA4B1B"}
|
|
@@ -18,9 +18,11 @@ export function MakeBabelTransformCjsToFunction(opts) {
|
|
|
18
18
|
identifiers = {};
|
|
19
19
|
addFilenameAndDirname = false;
|
|
20
20
|
addCreateRequire = false;
|
|
21
|
-
// wrap everything in a
|
|
21
|
+
// wrap everything in a function and export it as default
|
|
22
|
+
// @ts-expect-error
|
|
22
23
|
const body = state.ast.program.body;
|
|
23
24
|
const func = t.ExportDefaultDeclaration(t.FunctionDeclaration(t.Identifier('commonJsModule'), [t.identifier('module'), t.Identifier('exports'), t.Identifier('require')], t.BlockStatement([...body])));
|
|
25
|
+
// @ts-expect-error
|
|
24
26
|
state.ast.program.body = [func];
|
|
25
27
|
},
|
|
26
28
|
visitor: {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { NodePath } from '@babel/core';
|
|
2
2
|
import { CallExpression, Directive, Identifier } from 'babel-types';
|
|
3
|
+
import { Babel } from './BabelTypes.js';
|
|
3
4
|
type Opts = {
|
|
4
5
|
dependencies: string[];
|
|
5
6
|
};
|
|
6
|
-
export declare function MakeBabelTransformCjsToFunction(opts: Opts): (babel:
|
|
7
|
+
export declare function MakeBabelTransformCjsToFunction(opts: Opts): (babel: Babel) => {
|
|
7
8
|
pre(state: any): void;
|
|
8
9
|
visitor: {
|
|
9
10
|
CallExpression(path: NodePath<CallExpression>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformCjsToFunction2.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformCjsToFunction2.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"BabelTransformCjsToFunction2.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformCjsToFunction2.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AA6DvC,KAAK,IAAI,GAAG;IACR,YAAY,EAAE,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,IAAI,IACV,OAAO,KAAK;eAarC,GAAG;;6BAqCW,QAAQ,CAAC,cAAc,CAAC;yBAgC5B,QAAQ,CAAC,UAAU,CAAC;wBAerB,QAAQ,CAAC,SAAS,CAAC;;gBAM3B,OAAO;EAuI9B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NodePath } from '@babel/core';
|
|
2
|
-
import {
|
|
2
|
+
import { BabelFake } from './BabelFakeType.js';
|
|
3
3
|
import { AssignmentExpression, CallExpression, JSXExpressionContainer, UpdateExpression, VariableDeclaration } from 'babel-types';
|
|
4
|
-
export declare function MakeBabelTransformComponentState(): (babel:
|
|
4
|
+
export declare function MakeBabelTransformComponentState(): (babel: BabelFake) => {
|
|
5
5
|
pre(): void;
|
|
6
6
|
visitor: {
|
|
7
7
|
ClassMethod: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformComponentState.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformComponentState.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAQ,QAAQ,EAAS,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"BabelTransformComponentState.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformComponentState.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAQ,QAAQ,EAAS,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,sBAAsB,EAAoB,gBAAgB,EAAE,mBAAmB,EAAsB,MAAM,aAAa,CAAA;AAEvK,wBAAgB,gCAAgC,KACC,OAAO,SAAS;;;;wBAiFzC,QAAQ;uBAMT,QAAQ;;;wBANP,QAAQ;uBAMT,QAAQ;;mCAeY,QAAQ,CAAC,oBAAoB,CAAC;+BA0BlC,QAAQ,CAAC,gBAAgB,CAAC;6BAU5B,QAAQ,CAAC,cAAc,CAAC;kCA8BnB,QAAQ,CAAC,mBAAmB,CAAC;qCAgB1B,QAAQ,CAAC,sBAAsB,CAAC;;EAuB5E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BabelFake } from './BabelFakeType.js';
|
|
2
2
|
import type { NodePath } from '@babel/core';
|
|
3
3
|
import type { AssignmentExpression, CallExpression, JSXExpressionContainer, VariableDeclaration } from 'babel-types';
|
|
4
|
-
export declare function MakeBabelTransformDeproxyState(): (babel:
|
|
4
|
+
export declare function MakeBabelTransformDeproxyState(): (babel: BabelFake) => {
|
|
5
5
|
pre(): void;
|
|
6
6
|
visitor: {
|
|
7
7
|
AssignmentExpression(path: NodePath<AssignmentExpression>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformDeproxyState.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformDeproxyState.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BabelTransformDeproxyState.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformDeproxyState.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAc,sBAAsB,EAAoB,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAYlJ,wBAAgB,8BAA8B,KACC,OAAO,SAAS;;;mCAiDpB,QAAQ,CAAC,oBAAoB,CAAC;6BASpC,QAAQ,CAAC,cAAc,CAAC;kCAanB,QAAQ,CAAC,mBAAmB,CAAC;qCAW1B,QAAQ,CAAC,sBAAsB,CAAC;;gBAQrD,OAAO;EAgB9B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BabelFake } from './BabelFakeType.js';
|
|
2
2
|
import type { NodePath } from '@babel/core';
|
|
3
3
|
import type { CallExpression, MemberExpression } from 'babel-types';
|
|
4
|
-
export default function MakeBabelTransformBind(): (babel:
|
|
4
|
+
export default function MakeBabelTransformBind(): (babel: BabelFake) => {
|
|
5
5
|
name: string;
|
|
6
6
|
pre(): void;
|
|
7
7
|
visitor: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformReactive.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformReactive.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BabelTransformReactive.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformReactive.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AA+CnE,MAAM,CAAC,OAAO,UAAU,sBAAsB,KACP,OAAO,SAAS;;;;;wBA0BvB,QAAQ,CAAC,cAAc,CAAC,SAAS,GAAG;uBAwBrC,QAAQ,CAAC,cAAc,CAAC,SAAS,GAAG;;+BAwC5B,QAAQ,CAAC,gBAAgB,CAAC,SAAS,GAAG;;EA+B5E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BabelFake } from './BabelFakeType.js';
|
|
2
2
|
import type { NodePath } from '@babel/core';
|
|
3
3
|
import type { AssignmentExpression } from 'babel-types';
|
|
4
|
-
export default function MakeBabelTransformBind(): (babel:
|
|
4
|
+
export default function MakeBabelTransformBind(): (babel: BabelFake) => {
|
|
5
5
|
name: string;
|
|
6
6
|
visitor: {
|
|
7
7
|
AssignmentExpression(path: NodePath<AssignmentExpression>, state: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformReactiveSvelteStyle.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformReactiveSvelteStyle.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BabelTransformReactiveSvelteStyle.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformReactiveSvelteStyle.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAavD,MAAM,CAAC,OAAO,UAAU,sBAAsB,KACP,OAAO,SAAS;;;mCAKZ,QAAQ,CAAC,oBAAoB,CAAC,SAAS,GAAG;;EAmCpF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { types, NodePath } from '@babel/core';
|
|
2
|
-
import type {
|
|
3
|
-
export default function MakeBabelTransformUniqueComponents(): (babel:
|
|
2
|
+
import type { BabelFake } from './BabelFakeType.js';
|
|
3
|
+
export default function MakeBabelTransformUniqueComponents(): (babel: BabelFake) => {
|
|
4
4
|
visitor: {
|
|
5
5
|
JSXOpeningElement(path: NodePath<types.JSXOpeningElement>): void;
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BabelTransformUniqueComponents.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformUniqueComponents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BabelTransformUniqueComponents.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/BabelTransformUniqueComponents.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAcnD,MAAM,CAAC,OAAO,UAAU,kCAAkC,KACP,OAAO,SAAS;;gCAO3B,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC;;EAwBxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../src/bin/commands/build.ts"],"names":[],"mappings":"AAyCA,OAAO,EAAE,CAAA"}
|
|
@@ -20,7 +20,7 @@ if (sxyFramework.config.staticSite) {
|
|
|
20
20
|
cliOut(`Building static site`);
|
|
21
21
|
await sxyFramework.clean('staticSite');
|
|
22
22
|
await sxyFramework.staticGen();
|
|
23
|
-
cliNews(`Static site generation complete. Your site is in ${staticSiteFolder}
|
|
23
|
+
cliNews(`Static site generation complete. Your site is in ${staticSiteFolder}.` + ` View it with ${chalk.brightblue('npx tungsten static')}` + ` or add ${chalk.brightblue('"static": "tungsten static"')} to your package.json scripts` + ` and run ${chalk.brightblue('pnpm static')}`);
|
|
24
24
|
} else {
|
|
25
25
|
cliNews(`Production build complete`);
|
|
26
26
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type Load } from 'sxy-loader';
|
|
2
1
|
import type { FrameworkConfigComplete } from '../FrameworkConfig.js';
|
|
3
2
|
import { ZodType } from 'zod';
|
|
4
3
|
import { TungstenEnv } from './types.js';
|
|
@@ -6,7 +5,7 @@ export type EnvSchemas = {
|
|
|
6
5
|
privateEnvSchema?: ZodType<TungstenEnv & TungstenPrivateEnv>;
|
|
7
6
|
publicEnvSchema?: ZodType<TungstenEnv>;
|
|
8
7
|
};
|
|
9
|
-
export declare function getEnvSchemas(config: FrameworkConfigComplete,
|
|
10
|
-
export declare function getEnvSchemas(config: FrameworkConfigComplete,
|
|
11
|
-
export declare function getEnvSchemasDev(config: FrameworkConfigComplete,
|
|
8
|
+
export declare function getEnvSchemas(config: FrameworkConfigComplete, iteration: number, dev: 'dev'): Promise<EnvSchemas>;
|
|
9
|
+
export declare function getEnvSchemas(config: FrameworkConfigComplete, iteration?: null, dev?: 'prod'): Promise<EnvSchemas>;
|
|
10
|
+
export declare function getEnvSchemasDev(config: FrameworkConfigComplete, iteration: number): Promise<EnvSchemas>;
|
|
12
11
|
//# sourceMappingURL=getEnvSchemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEnvSchemas.d.ts","sourceRoot":"","sources":["../../src/env/getEnvSchemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getEnvSchemas.d.ts","sourceRoot":"","sources":["../../src/env/getEnvSchemas.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAEpE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAG7B,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAGxC,MAAM,MAAM,UAAU,GAAG;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC,WAAW,GAAG,kBAAkB,CAAC,CAAC;IAC7D,eAAe,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CAC1C,CAAA;AAKD,wBAAsB,aAAa,CAAC,MAAM,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,GAChG,OAAO,CAAC,UAAU,CAAC,CAAA;AACrB,wBAAsB,aAAa,CAAC,MAAM,EAAE,uBAAuB,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,MAAM,GACjG,OAAO,CAAC,UAAU,CAAC,CAAA;AAoErB,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,uBAGlF"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
2
|
import { fixExtension } from "../fixExtension.js";
|
|
3
3
|
import { throwError } from "../throwError.js";
|
|
4
|
-
export async function getEnvSchemas(config,
|
|
4
|
+
export async function getEnvSchemas(config, iteration = null, mode = 'prod') {
|
|
5
5
|
const {
|
|
6
6
|
envSchemasLocation
|
|
7
7
|
} = config;
|
|
8
|
-
if (envSchemasLocation === undefined) return {}
|
|
8
|
+
//if (envSchemasLocation === undefined) return {} // I think we're validating configs now, so don't need this
|
|
9
9
|
//console.log('envSchemasLocation', envSchemasLocation)
|
|
10
10
|
const projectDir = process.cwd();
|
|
11
11
|
const fullFilePath = 'file://' + join(projectDir, config.codeDir, fixExtension(envSchemasLocation));
|
|
12
12
|
let module;
|
|
13
13
|
try {
|
|
14
|
-
if (dev) {
|
|
15
|
-
if (
|
|
16
|
-
|
|
14
|
+
if (mode === 'dev') {
|
|
15
|
+
if (iteration === null) throwError('getEnvSchemas()', 'iteration is null');
|
|
16
|
+
//if (!load) throwError('getEnvSchemas()', 'load is null')
|
|
17
|
+
//module = await load(fullFilePath)
|
|
18
|
+
module = await import(fullFilePath + '?i=' + iteration.toString());
|
|
17
19
|
} else {
|
|
18
20
|
module = await import(fullFilePath);
|
|
19
21
|
}
|
|
@@ -41,6 +43,8 @@ export async function getEnvSchemas(config, load = null, dev = false) {
|
|
|
41
43
|
throwError('getEnvSchemas()', `Error loading env schemas file` + `\n${e}` + `\nExpected to find a file with Zod schemas at ${envSchemasLocation}` + `\nThis location is set with the envSchemasLocations setting in tungsten.config.js`);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
|
-
export function getEnvSchemasDev(config, load) {
|
|
45
|
-
|
|
46
|
+
//export function getEnvSchemasDev(config: FrameworkConfigComplete, load: Load) {
|
|
47
|
+
export function getEnvSchemasDev(config, iteration) {
|
|
48
|
+
//return getEnvSchemas(config, load, true)
|
|
49
|
+
return getEnvSchemas(config, iteration, 'dev');
|
|
46
50
|
}
|
package/dist/getComponent.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Load } from 'sxy-loader';
|
|
2
1
|
import type { AnyComponentType } from './AnyComponentType.js';
|
|
3
|
-
|
|
2
|
+
import { Mode } from './Mode.js';
|
|
3
|
+
export declare function getComponent(filePath: string, filename: string, iteration?: number | null, mode?: Mode): Promise<AnyComponentType>;
|
|
4
4
|
//# sourceMappingURL=getComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getComponent.d.ts","sourceRoot":"","sources":["../src/getComponent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getComponent.d.ts","sourceRoot":"","sources":["../src/getComponent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAG7D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAMhC,wBAAsB,YAAY,CAC9B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAEhB,SAAS,GAAE,MAAM,GAAG,IAAW,EAC/B,IAAI,GAAE,IAAa,GACpB,OAAO,CAAC,gBAAgB,CAAC,CA6B3B"}
|
package/dist/getComponent.js
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { fixExtension } from "./fixExtension.js";
|
|
2
2
|
import { TungstenError } from "./TungstenError.js";
|
|
3
|
+
import { throwError } from "./throwError.js";
|
|
4
|
+
import { iterationQueryString } from "./iterationQueryString.js";
|
|
3
5
|
//let load //// !! future improvement
|
|
4
|
-
export async function getComponent(filePath, filename,
|
|
6
|
+
export async function getComponent(filePath, filename,
|
|
7
|
+
//load: Load | null = null,
|
|
8
|
+
iteration = null, mode = 'prod') {
|
|
5
9
|
filePath = 'file://' + fixExtension(filePath);
|
|
6
10
|
//console.log(filePath)
|
|
7
11
|
let module;
|
|
8
|
-
if (dev && load) {
|
|
12
|
+
// if (dev && load) {
|
|
13
|
+
if (mode === 'dev') {
|
|
14
|
+
if (iteration === null) throwError('getComponent()', 'iteration is null in dev mode');
|
|
9
15
|
//if ( ! load ) load = await createLoad(import.meta.url, sxyLoaderConfig) //// !! future improvement
|
|
10
16
|
//const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
11
17
|
//console.log('load', filePath)
|
|
12
|
-
module = await load(filePath)
|
|
18
|
+
//module = await load(filePath)
|
|
19
|
+
module = await import(iterationQueryString(filePath, iteration));
|
|
13
20
|
} else {
|
|
14
21
|
//console.log('import', filePath)
|
|
15
22
|
module = await import(filePath); // import the module
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Load } from 'sxy-loader';
|
|
2
1
|
import type { AnyComponentType } from './AnyComponentType.js';
|
|
3
|
-
export declare function getComponentDev(filePath: string, filename: string,
|
|
2
|
+
export declare function getComponentDev(filePath: string, filename: string, iteration: number): Promise<AnyComponentType>;
|
|
4
3
|
//# sourceMappingURL=getComponentDev.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getComponentDev.d.ts","sourceRoot":"","sources":["../src/getComponentDev.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getComponentDev.d.ts","sourceRoot":"","sources":["../src/getComponentDev.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAI7D,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAGhH"}
|
package/dist/getComponentDev.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { getComponent } from "./getComponent.js";
|
|
2
|
-
export function getComponentDev(filePath, filename, load) {
|
|
3
|
-
|
|
2
|
+
//export function getComponentDev(filePath: string, filename: string, load: Load): Promise<AnyComponentType> {
|
|
3
|
+
export function getComponentDev(filePath, filename, iteration) {
|
|
4
|
+
//return getComponent(filePath, filename, load, true)
|
|
5
|
+
return getComponent(filePath, filename, iteration, 'dev');
|
|
4
6
|
}
|
package/dist/getRoutes.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Load } from 'sxy-loader';
|
|
2
1
|
import type { AppRoutes } from './routing/AppRoutes.js';
|
|
2
|
+
import type { Mode } from './Mode.js';
|
|
3
3
|
import { FrameworkConfigComplete } from './FrameworkConfig.js';
|
|
4
4
|
import { CompilationInfo } from './build/CompilationInfo.js';
|
|
5
|
-
export declare function getRoutes(compilationInfo: CompilationInfo, config: FrameworkConfigComplete,
|
|
5
|
+
export declare function getRoutes(compilationInfo: CompilationInfo, config: FrameworkConfigComplete, iteration?: number | null, mode?: Mode): Promise<AppRoutes>;
|
|
6
6
|
//# sourceMappingURL=getRoutes.d.ts.map
|
package/dist/getRoutes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRoutes.d.ts","sourceRoot":"","sources":["../src/getRoutes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getRoutes.d.ts","sourceRoot":"","sources":["../src/getRoutes.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAK5D,wBAAsB,SAAS,CAC3B,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,uBAAuB,EAE/B,SAAS,GAAE,MAAM,GAAG,IAAW,EAC/B,IAAI,GAAE,IAAa,GACnB,OAAO,CAAC,SAAS,CAAC,CAmCrB"}
|
package/dist/getRoutes.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
2
|
import { fixExtension } from "./fixExtension.js";
|
|
3
3
|
import { TungstenError } from "./TungstenError.js";
|
|
4
|
-
|
|
4
|
+
import { iterationQueryString } from "./iterationQueryString.js";
|
|
5
|
+
import { throwError } from "./throwError.js";
|
|
6
|
+
export async function getRoutes(compilationInfo, config,
|
|
7
|
+
//load: Load | null = null,
|
|
8
|
+
iteration = null, mode = 'prod') {
|
|
5
9
|
//console.log('config.routesLocation', config.routesLocation)
|
|
6
10
|
//console.log('config.routesLocation', config.routesLocation)
|
|
7
11
|
const routesLocation = config.routesLocation;
|
|
@@ -13,10 +17,12 @@ export async function getRoutes(compilationInfo, config, load = null, dev = fals
|
|
|
13
17
|
//console.log(fixExtension( join(compilationInfo.location, routesFile) ))
|
|
14
18
|
const filePath = 'file://' + fixExtension(join(compilationInfo.location, routesFile));
|
|
15
19
|
let module;
|
|
16
|
-
if (
|
|
20
|
+
if (mode === 'dev') {
|
|
21
|
+
if (iteration === null) throwError('getComponent()', 'iteration is null in dev mode');
|
|
17
22
|
// can we share load across the render?
|
|
18
23
|
//const load = await createLoad(import.meta.url, sxyLoaderConfig)
|
|
19
|
-
module = await load(filePath)
|
|
24
|
+
//module = await load(filePath)
|
|
25
|
+
module = await import(iterationQueryString(filePath, iteration));
|
|
20
26
|
} else {
|
|
21
27
|
module = await import(filePath); // import the module
|
|
22
28
|
}
|
package/dist/getRoutesDevs.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Load } from 'sxy-loader';
|
|
2
1
|
import type { FrameworkConfigComplete } from './FrameworkConfig.js';
|
|
3
2
|
import type { CompilationInfo } from './build/CompilationInfo.js';
|
|
4
|
-
export declare function getRoutesDev(compilationInfo: CompilationInfo, config: FrameworkConfigComplete,
|
|
3
|
+
export declare function getRoutesDev(compilationInfo: CompilationInfo, config: FrameworkConfigComplete, iteration: number): Promise<import("./routing/AppRoutes.js").AppRoutes>;
|
|
5
4
|
//# sourceMappingURL=getRoutesDevs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRoutesDevs.d.ts","sourceRoot":"","sources":["../src/getRoutesDevs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getRoutesDevs.d.ts","sourceRoot":"","sources":["../src/getRoutesDevs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAKjE,wBAAgB,YAAY,CAAC,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,uDAGhH"}
|
package/dist/getRoutesDevs.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { getRoutes } from "./getRoutes.js";
|
|
2
2
|
// async
|
|
3
|
-
export function getRoutesDev(compilationInfo, config, load) {
|
|
4
|
-
|
|
3
|
+
//export function getRoutesDev(compilationInfo: CompilationInfo, config: FrameworkConfigComplete, load: Load) {
|
|
4
|
+
export function getRoutesDev(compilationInfo, config, iteration) {
|
|
5
|
+
//return getRoutes(compilationInfo, config, load, true)
|
|
6
|
+
return getRoutes(compilationInfo, config, iteration, 'dev');
|
|
5
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterationQueryString.d.ts","sourceRoot":"","sources":["../src/iterationQueryString.ts"],"names":[],"mappings":"AACA,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAErE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeFinalConfig.d.ts","sourceRoot":"","sources":["../src/makeFinalConfig.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAGpF,wBAAgB,eAAe,CAAC,UAAU,EAAE,eAAe,GAAG,uBAAuB,
|
|
1
|
+
{"version":3,"file":"makeFinalConfig.d.ts","sourceRoot":"","sources":["../src/makeFinalConfig.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAGpF,wBAAgB,eAAe,CAAC,UAAU,EAAE,eAAe,GAAG,uBAAuB,CAUpF"}
|
package/dist/makeFinalConfig.js
CHANGED
|
@@ -2,11 +2,9 @@ import { defaultConfig } from "./defaultConfig.js";
|
|
|
2
2
|
export function makeFinalConfig(userConfig) {
|
|
3
3
|
const finalConfig = structuredClone(defaultConfig);
|
|
4
4
|
for (const key in userConfig) {
|
|
5
|
-
if (Object.prototype.hasOwnProperty.call(userConfig, key)) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
finalConfig[key] = userConfig[key];
|
|
9
|
-
}
|
|
5
|
+
//if (Object.prototype.hasOwnProperty.call(userConfig, key)) { // github co-pilot suggestion, unsure if needed
|
|
6
|
+
finalConfig[key] = userConfig[key]; // eslint-disable-line no-type-assertion/no-type-assertion
|
|
7
|
+
//}
|
|
10
8
|
}
|
|
11
9
|
return finalConfig;
|
|
12
10
|
}
|
package/dist/settings.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const buildFolder = ".tungsten";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const devBuildOuterFolder = ".tungsten/dev";
|
|
3
|
+
export declare const devBuildFolder = ".tungsten/dev/code";
|
|
3
4
|
export declare const prodBuildFolder = ".tungsten/prod";
|
|
4
5
|
export declare const bundleFolder = ".tungsten/prod/.bundle";
|
|
5
6
|
export declare const staticSiteFolder = ".tungsten/staticSite";
|
package/dist/settings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,cAAc,CAAA;AACtC,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,cAAc,CAAA;AACtC,eAAO,MAAM,mBAAmB,kBAAuB,CAAA;AACvD,eAAO,MAAM,cAAc,uBAAgC,CAAA;AAC3D,eAAO,MAAM,eAAe,mBAAwB,CAAA;AACpD,eAAO,MAAM,YAAY,2BAA+B,CAAA;AACxD,eAAO,MAAM,gBAAgB,yBAA8B,CAAA;AAC3D,eAAO,MAAM,mBAAmB,4BAAiC,CAAA;AACjE,eAAO,MAAM,qBAAqB,cAAc,CAAA;AAChD,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,YAAY,YAAY,CAAA;AACrC,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AACjD,eAAO,MAAM,gBAAgB,YAAY,CAAA;AACzC,eAAO,MAAM,cAAc,cAAc,CAAA;AAEzC,eAAO,MAAM,WAAW,aAAa,CAAA;AACrC,eAAO,MAAM,sBAAsB,aAAa,CAAA;AAChD,eAAO,MAAM,qBAAqB,YAAY,CAAA;AAC9C,eAAO,MAAM,mBAAmB,SAAS,CAAA"}
|
package/dist/settings.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const buildFolder = '.tungsten';
|
|
2
|
-
export const
|
|
2
|
+
export const devBuildOuterFolder = `${buildFolder}/dev`;
|
|
3
|
+
export const devBuildFolder = `${devBuildOuterFolder}/code`;
|
|
3
4
|
export const prodBuildFolder = `${buildFolder}/prod`;
|
|
4
5
|
export const bundleFolder = `${prodBuildFolder}/.bundle`;
|
|
5
6
|
export const staticSiteFolder = `${buildFolder}/staticSite`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAppRoutes.d.ts","sourceRoot":"","sources":["../../src/staticGen/getAppRoutes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAGlE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;
|
|
1
|
+
{"version":3,"file":"getAppRoutes.d.ts","sourceRoot":"","sources":["../../src/staticGen/getAppRoutes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAGlE,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAA;AAMzD,wBAAsB,YAAY,CAAC,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,uBAAuB,GAC9F,OAAO,CAAC,SAAS,CAAC,CA+BvB"}
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
2
|
import { fixExtension } from "../fixExtension.js";
|
|
3
3
|
import { TungstenError } from "../TungstenError.js";
|
|
4
|
-
//
|
|
4
|
+
// prod: const appRoutes: AppRoutes = await getRoutes(this.compilationInfo, this.config)
|
|
5
|
+
// this file is outdated and may not work correctly
|
|
5
6
|
// should compare this to the functions used by Servers
|
|
6
7
|
export async function getAppRoutes(compilationInfo, config) {
|
|
7
|
-
const fullBuildLocation = 'file://' + compilationInfo.location
|
|
8
|
+
//const fullBuildLocation = 'file://' + compilationInfo.location
|
|
8
9
|
const routesLocation = config.routesLocation;
|
|
9
|
-
if (routesLocation === null) return routesLocation
|
|
10
|
+
//if (routesLocation === null) return routesLocation // hopefully we are validating
|
|
10
11
|
try {
|
|
11
12
|
if (Array.isArray(routesLocation)) {
|
|
12
|
-
const routesFile = fixExtension(join(
|
|
13
|
-
|
|
13
|
+
const routesFile = fixExtension(join(compilationInfo.location, routesLocation[0]));
|
|
14
|
+
console.log('[1] fullBuildLocation', compilationInfo.location);
|
|
15
|
+
console.log('[1] routesLocation[0]', routesLocation[0]);
|
|
16
|
+
console.log('joined', join(compilationInfo.location, routesLocation[0]));
|
|
17
|
+
console.log('[1] routesFile', routesFile);
|
|
18
|
+
const target = 'file://' + routesFile;
|
|
19
|
+
console.log('[1] target', target);
|
|
20
|
+
return (await import(target))[routesLocation[1]];
|
|
14
21
|
} else {
|
|
15
|
-
const
|
|
22
|
+
const target = 'file://' + join(compilationInfo.location, routesLocation);
|
|
23
|
+
console.log('[2] location', target);
|
|
24
|
+
const module = await import(target);
|
|
16
25
|
if ('routes' in module) return module.routes;else if ('default' in module) return module.default;else throw new TungstenError(`Err, no 'routes' or 'default' export found in routes file ${routesLocation}`);
|
|
17
26
|
}
|
|
18
27
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tungsten",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"cross-env": "^7.0.3",
|
|
51
51
|
"decamelize": "^6.0.1",
|
|
52
52
|
"dotenv": "^16.6.1",
|
|
53
|
+
"esm-reload": "^1.0.1",
|
|
53
54
|
"express": "^4.22.1",
|
|
54
55
|
"find-package-json": "^1.2.0",
|
|
55
56
|
"fs-extra": "^10.1.0",
|
package/types/modules.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare module '@babel/preset-react'
|
|
2
|
-
declare module 'babel-plugin-sxy-module-resolver'
|
|
3
|
-
declare module 'babel-plugin-css-to-js'
|
|
4
|
-
declare module '@babel/plugin-transform-class-properties'
|
|
5
|
-
declare module '@rollup/plugin-node-resolve'
|
|
6
|
-
declare module '@rollup/plugin-commonjs'
|
|
7
|
-
declare module 'rollup-plugin-terser'
|
|
1
|
+
declare module '@babel/preset-react'
|
|
2
|
+
declare module 'babel-plugin-sxy-module-resolver'
|
|
3
|
+
declare module 'babel-plugin-css-to-js'
|
|
4
|
+
declare module '@babel/plugin-transform-class-properties'
|
|
5
|
+
declare module '@rollup/plugin-node-resolve'
|
|
6
|
+
declare module '@rollup/plugin-commonjs'
|
|
7
|
+
declare module 'rollup-plugin-terser'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Babel.type.d.ts","sourceRoot":"","sources":["../../src/babelPlugins/Babel.type.ts"],"names":[],"mappings":""}
|