@botpress/cli 0.0.3 → 0.0.5
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/bin.js +0 -0
- package/dist/app/api-utils.js +5 -4
- package/dist/app/base.js +39 -1
- package/dist/app/errors.js +18 -19
- package/dist/app/file-paths.js +82 -0
- package/dist/app/generator/module.js +1 -1
- package/dist/app/index.js +15 -10
- package/dist/app/project.js +198 -240
- package/dist/app/user.js +5 -16
- package/dist/config.js +8 -3
- package/dist/{const.js → consts.js} +12 -34
- package/dist/{app/esbuild.js → esbuild-utils.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/logger/index.js +5 -5
- package/dist/{paths.js → path-utils.js} +3 -3
- package/dist/{requires.js → require-utils.js} +3 -3
- package/dist/worker/child-entrypoint.js +4 -2
- package/package.json +2 -2
- package/readme.md +0 -1
- package/dist/index.js.map +0 -7
- package/dist/init.js.map +0 -7
- package/dist/type-utils.js +0 -16
package/dist/init.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/init.ts"],
|
|
4
|
-
"sourcesContent": ["import Module from 'module'\nimport pathlib from 'path'\n\nconst DEFAULT_DIRNAME = '.botpress'\n\nconst getOutDir = () => {\n const { BP_OUTDIR } = process.env\n if (!BP_OUTDIR) {\n return pathlib.join(process.cwd(), DEFAULT_DIRNAME)\n }\n if (pathlib.isAbsolute(BP_OUTDIR)) {\n return BP_OUTDIR\n }\n return pathlib.join(process.cwd(), BP_OUTDIR)\n}\n\nconst outDirPath = getOutDir()\nconst outDirName = pathlib.basename(outDirPath)\nconst originalRequire = Module.prototype.require\n\nconst rewire = function (this: NodeRequire, mod: string) {\n const importParts = mod.split('/')\n\n if (importParts[0] === outDirName) {\n const newMod = importParts.slice(1).join('/')\n const fullpath = pathlib.join(outDirPath, newMod)\n return originalRequire.apply(this, [fullpath])\n }\n\n return originalRequire.apply(this, [mod])\n} as NodeRequire\n\nModule.prototype.require = rewire\n"],
|
|
5
|
-
"mappings": "wdAAA,IAAAA,EAAmB,qBACnBC,EAAoB,mBAEdC,EAAkB,YAElBC,EAAY,IAAM,CACtB,GAAM,CAAE,UAAAC,CAAU,EAAI,QAAQ,IAC9B,OAAKA,EAGD,EAAAC,QAAQ,WAAWD,CAAS,EACvBA,EAEF,EAAAC,QAAQ,KAAK,QAAQ,IAAI,EAAGD,CAAS,EALnC,EAAAC,QAAQ,KAAK,QAAQ,IAAI,EAAGH,CAAe,CAMtD,EAEMI,EAAaH,EAAU,EACvBI,EAAa,EAAAF,QAAQ,SAASC,CAAU,EACxCE,EAAkB,EAAAC,QAAO,UAAU,QAEnCC,EAAS,SAA6BC,EAAa,CACvD,IAAMC,EAAcD,EAAI,MAAM,GAAG,EAEjC,GAAIC,EAAY,KAAOL,EAAY,CACjC,IAAMM,EAASD,EAAY,MAAM,CAAC,EAAE,KAAK,GAAG,EACtCE,EAAW,EAAAT,QAAQ,KAAKC,EAAYO,CAAM,EAChD,OAAOL,EAAgB,MAAM,KAAM,CAACM,CAAQ,CAAC,CAC/C,CAEA,OAAON,EAAgB,MAAM,KAAM,CAACG,CAAG,CAAC,CAC1C,EAEA,EAAAF,QAAO,UAAU,QAAUC",
|
|
6
|
-
"names": ["import_module", "import_path", "DEFAULT_DIRNAME", "getOutDir", "BP_OUTDIR", "pathlib", "outDirPath", "outDirName", "originalRequire", "Module", "rewire", "mod", "importParts", "newMod", "fullpath"]
|
|
7
|
-
}
|
package/dist/type-utils.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
var type_utils_exports = {};
|
|
16
|
-
module.exports = __toCommonJS(type_utils_exports);
|