tnp-core 21.0.96 → 21.0.98
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/browser/fesm2022/tnp-core-browser.mjs +49 -2
- package/browser/fesm2022/tnp-core-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/tnp-core-browser.d.ts +21 -2
- package/browser-prod/fesm2022/tnp-core-browser.mjs +49 -2
- package/browser-prod/fesm2022/tnp-core-browser.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/browser-prod/types/tnp-core-browser.d.ts +21 -2
- package/cli.backend.js +2 -2
- package/lib/build-info._auto-generated_.d.ts +3 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/env/env.angular-node-app.js +64 -0
- package/lib/env/env.angular-node-app.js.map +1 -1
- package/lib/env/env.docs-webapp.js +64 -0
- package/lib/env/env.docs-webapp.js.map +1 -1
- package/lib/env/env.electron-app.js +64 -0
- package/lib/env/env.electron-app.js.map +1 -1
- package/lib/env/env.mobile-app.js +64 -0
- package/lib/env/env.mobile-app.js.map +1 -1
- package/lib/env/env.npm-lib-and-cli-tool.js +64 -0
- package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
- package/lib/env/env.vscode-plugin.js +64 -0
- package/lib/env/env.vscode-plugin.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/node-chalk-mock.js +2 -2
- package/lib/node-path-mock.js +2 -2
- package/lib/package.json +1 -1
- package/lib/taon-stripe-cloudflare-worker.d.ts +18 -0
- package/lib/taon-stripe-cloudflare-worker.js +47 -0
- package/lib/taon-stripe-cloudflare-worker.js.map +1 -0
- package/lib/utils.js +5 -1
- package/lib/utils.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +3 -1
- package/lib-prod/build-info._auto-generated_.js.map +1 -1
- package/lib-prod/env/env.angular-node-app.js +64 -0
- package/lib-prod/env/env.angular-node-app.js.map +1 -1
- package/lib-prod/env/env.docs-webapp.js +64 -0
- package/lib-prod/env/env.docs-webapp.js.map +1 -1
- package/lib-prod/env/env.electron-app.js +64 -0
- package/lib-prod/env/env.electron-app.js.map +1 -1
- package/lib-prod/env/env.mobile-app.js +64 -0
- package/lib-prod/env/env.mobile-app.js.map +1 -1
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +64 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +1 -1
- package/lib-prod/env/env.vscode-plugin.js +64 -0
- package/lib-prod/env/env.vscode-plugin.js.map +1 -1
- package/lib-prod/index.d.ts +1 -0
- package/lib-prod/index.js +1 -0
- package/lib-prod/index.js.map +1 -1
- package/lib-prod/node-chalk-mock.d.ts +1 -1
- package/lib-prod/node-chalk-mock.js +1 -1
- package/lib-prod/node-path-mock.d.ts +1 -1
- package/lib-prod/node-path-mock.js +1 -1
- package/lib-prod/package.json +1 -1
- package/lib-prod/taon-stripe-cloudflare-worker.d.ts +18 -0
- package/lib-prod/taon-stripe-cloudflare-worker.js +43 -0
- package/lib-prod/taon-stripe-cloudflare-worker.js.map +1 -0
- package/lib-prod/utils.js +5 -1
- package/lib-prod/utils.js.map +1 -1
- package/package.json +1 -1
- package/websql/fesm2022/tnp-core-websql.mjs +49 -2
- package/websql/fesm2022/tnp-core-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/tnp-core-websql.d.ts +21 -2
- package/websql-prod/fesm2022/tnp-core-websql.mjs +49 -2
- package/websql-prod/fesm2022/tnp-core-websql.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
- package/websql-prod/types/tnp-core-websql.d.ts +21 -2
|
@@ -3902,6 +3902,11 @@ var UtilsExecProc;
|
|
|
3902
3902
|
/* */
|
|
3903
3903
|
/* */
|
|
3904
3904
|
/* */
|
|
3905
|
+
/* */
|
|
3906
|
+
/* */
|
|
3907
|
+
/* */
|
|
3908
|
+
/* */
|
|
3909
|
+
/* */
|
|
3905
3910
|
return (void 0);
|
|
3906
3911
|
}
|
|
3907
3912
|
}
|
|
@@ -3914,7 +3919,7 @@ var UtilsExecProc;
|
|
|
3914
3919
|
options = options || {};
|
|
3915
3920
|
options.cwd = crossPlatformPath(options.cwd || process.cwd());
|
|
3916
3921
|
const [cmd, ...args] = command.split(' ');
|
|
3917
|
-
return new ExecProcResult(cmd, args);
|
|
3922
|
+
return new ExecProcResult(cmd, args, options);
|
|
3918
3923
|
};
|
|
3919
3924
|
//#endregion
|
|
3920
3925
|
//#region utils exec process / spawn admin sudo
|
|
@@ -11415,9 +11420,51 @@ const config = {
|
|
|
11415
11420
|
// };
|
|
11416
11421
|
//#endregion
|
|
11417
11422
|
|
|
11423
|
+
var TaonStripeCloudflareKey;
|
|
11424
|
+
(function (TaonStripeCloudflareKey) {
|
|
11425
|
+
TaonStripeCloudflareKey["stripeSessionId"] = "stripeSessionId";
|
|
11426
|
+
TaonStripeCloudflareKey["clientEmail"] = "clientEmail";
|
|
11427
|
+
TaonStripeCloudflareKey["productId"] = "productId";
|
|
11428
|
+
})(TaonStripeCloudflareKey || (TaonStripeCloudflareKey = {}));
|
|
11429
|
+
class TaonStripeCloudflareWorker {
|
|
11430
|
+
static { this.HOOK_POST = '/stripe-webhook'; }
|
|
11431
|
+
static { this.HOOK_GET = '/check-access'; }
|
|
11432
|
+
constructor(url) {
|
|
11433
|
+
this.url = url;
|
|
11434
|
+
}
|
|
11435
|
+
async sendAsStripe(data) {
|
|
11436
|
+
const resp = await fetch(this.url + TaonStripeCloudflareWorker.HOOK_POST, {
|
|
11437
|
+
method: 'POST',
|
|
11438
|
+
headers: {
|
|
11439
|
+
'Content-Type': 'application/json',
|
|
11440
|
+
},
|
|
11441
|
+
body: JSON.stringify(data),
|
|
11442
|
+
});
|
|
11443
|
+
if (!resp.ok) {
|
|
11444
|
+
throw new Error(`Stripe worker error ${resp.status}`);
|
|
11445
|
+
}
|
|
11446
|
+
}
|
|
11447
|
+
async checkAccess(data) {
|
|
11448
|
+
const params = new URLSearchParams();
|
|
11449
|
+
for (const [key, value] of Object.entries(data)) {
|
|
11450
|
+
if (value !== undefined && value !== null) {
|
|
11451
|
+
params.append(key, String(value));
|
|
11452
|
+
}
|
|
11453
|
+
}
|
|
11454
|
+
const urlForAccessCheck = `${this.url + TaonStripeCloudflareWorker.HOOK_GET}?${params}`;
|
|
11455
|
+
// console.log({ urlForAccessCheck });
|
|
11456
|
+
const resp = await fetch(urlForAccessCheck);
|
|
11457
|
+
if (!resp.ok) {
|
|
11458
|
+
return false;
|
|
11459
|
+
}
|
|
11460
|
+
const body = await resp.json();
|
|
11461
|
+
return body?.hasAccess ?? false;
|
|
11462
|
+
}
|
|
11463
|
+
}
|
|
11464
|
+
|
|
11418
11465
|
/**
|
|
11419
11466
|
* Generated bundle index. Do not edit.
|
|
11420
11467
|
*/
|
|
11421
11468
|
|
|
11422
|
-
export { $, BaselineSiteJoinprefix, CLI, CoreConfig, CoreModels, FilePathMetaData, FilesNames, GlobalLibTypeName, GlobalStorage, GlobalTaskManager, GlobalTaskManagerClass, Helpers, LibTypeArr, LibTypeEnum, PREFIXES, PROGRESS_DATA, REGEX_REGION, TAGS, Utils, UtilsCliClassMethod, UtilsDotFile, UtilsEtcHosts, UtilsExecProc, UtilsFilesFolders, UtilsFilesFoldersSync, UtilsJson, UtilsMessages, UtilsMigrations, UtilsNetwork, UtilsOs, UtilsProcess, UtilsProcessLogger, UtilsString, UtilsStringRegex, UtilsSudo, UtilsTerminal, UtilsYaml, _, appRelatedFiles, areTrustedForPatchUpdate, backendNodejsOnlyFiles, backendWebsqlNodejsFiles, baseTaonDevProjectsNames, chalk, child_process, chokidar, config, crossPlatformPath, dateformat, dockerTemplates, dotTaonFolder, dotTnpFolder, encoding, extAllowedToExportAndReplaceTSJSCodeFiles, extAllowedToReplace, extForSassLikeFiles, extForStyles, extTemplatesFiles, fg, fileName, filesNotAllowedToClean, fkill, folderName, frameworkName, frameworkNameBe, frontEndOnly, frontendFiles, fse, glob, http, https, isElevated, load, mkdirp, ncp, net, notAllowedNames, notAllowedProjectNames, notNeededForExportFiles, os, path, ps, psList, requireDefault, requiredForDev, rimraf, spawn, taonContainers, taonPackageName, taonProjects, tempFoldersName, tnpPackageName, urlRepoTaon, urlRepoTaonContainers, win32Path };
|
|
11469
|
+
export { $, BaselineSiteJoinprefix, CLI, CoreConfig, CoreModels, FilePathMetaData, FilesNames, GlobalLibTypeName, GlobalStorage, GlobalTaskManager, GlobalTaskManagerClass, Helpers, LibTypeArr, LibTypeEnum, PREFIXES, PROGRESS_DATA, REGEX_REGION, TAGS, TaonStripeCloudflareKey, TaonStripeCloudflareWorker, Utils, UtilsCliClassMethod, UtilsDotFile, UtilsEtcHosts, UtilsExecProc, UtilsFilesFolders, UtilsFilesFoldersSync, UtilsJson, UtilsMessages, UtilsMigrations, UtilsNetwork, UtilsOs, UtilsProcess, UtilsProcessLogger, UtilsString, UtilsStringRegex, UtilsSudo, UtilsTerminal, UtilsYaml, _, appRelatedFiles, areTrustedForPatchUpdate, backendNodejsOnlyFiles, backendWebsqlNodejsFiles, baseTaonDevProjectsNames, chalk, child_process, chokidar, config, crossPlatformPath, dateformat, dockerTemplates, dotTaonFolder, dotTnpFolder, encoding, extAllowedToExportAndReplaceTSJSCodeFiles, extAllowedToReplace, extForSassLikeFiles, extForStyles, extTemplatesFiles, fg, fileName, filesNotAllowedToClean, fkill, folderName, frameworkName, frameworkNameBe, frontEndOnly, frontendFiles, fse, glob, http, https, isElevated, load, mkdirp, ncp, net, notAllowedNames, notAllowedProjectNames, notNeededForExportFiles, os, path, ps, psList, requireDefault, requiredForDev, rimraf, spawn, taonContainers, taonPackageName, taonProjects, tempFoldersName, tnpPackageName, urlRepoTaon, urlRepoTaonContainers, win32Path };
|
|
11423
11470
|
//# sourceMappingURL=tnp-core-browser.mjs.map
|