@wpmoo/odoo 0.8.43 → 0.8.45
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/README.md +5 -6
- package/dist/cli.js +15 -12
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|

|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
[](https://github.com/wpmoo-org/wpmoo-odoo/actions/workflows/ci.yml)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
[](https://www.buymeacoffee.com/cangir)
|
|
6
|
+
[](https://github.com/wpmoo-org/wpmoo-odoo/actions/workflows/ci.yml) [](https://github.com/wpmoo-org/wpmoo-odoo) [](https://www.npmjs.com/package/@wpmoo/odoo) [](https://coveralls.io/github/wpmoo-org/wpmoo-odoo?branch=main) [](LICENSE) [](https://github.com/wpmoo-org/wpmoo-odoo) [](https://www.buymeacoffee.com/cangir)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
12
11
|
|
|
13
12
|
WPMoo Odoo lifecycle tooling for development, staging, and production workflows.
|
|
14
13
|
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { confirm, intro, isCancel, note, outro, select, text } from '@clack/prompts';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
|
+
import { pathToFileURL } from 'node:url';
|
|
4
5
|
import { commandFromArgs, defaultTargetForProduct, isHelpRequested, isVersionRequested, optionsFromArgs, parseArgs, stripInternalFlags, } from './args.js';
|
|
5
6
|
import { detectDevelopmentEnvironment } from './environment.js';
|
|
6
7
|
import { commandOdooVersion } from './environment-version.js';
|
|
@@ -544,9 +545,9 @@ async function ensureGitHubRepositories(options, interactive) {
|
|
|
544
545
|
process.exit(1);
|
|
545
546
|
await createGitHubRepositories(missing, visibility);
|
|
546
547
|
}
|
|
547
|
-
async function
|
|
548
|
+
export async function runCli(cliArgv = process.argv.slice(2), cwd = process.cwd()) {
|
|
548
549
|
installPromptCancelKeyTracker();
|
|
549
|
-
const rawArgv =
|
|
550
|
+
const rawArgv = cliArgv;
|
|
550
551
|
const skipUpdateCheck = isUpdateCheckSkipped(rawArgv);
|
|
551
552
|
const argv = stripInternalFlags(rawArgv);
|
|
552
553
|
if (isHelpRequested(argv)) {
|
|
@@ -560,7 +561,7 @@ async function main() {
|
|
|
560
561
|
const route = commandFromArgs(argv);
|
|
561
562
|
if (route.command === 'menu') {
|
|
562
563
|
await showStartup(argv, skipUpdateCheck);
|
|
563
|
-
const detection = await detectDevelopmentEnvironment(
|
|
564
|
+
const detection = await detectDevelopmentEnvironment(cwd);
|
|
564
565
|
if (!detection.isEnvironment) {
|
|
565
566
|
const resolvedOptions = await optionsFromPrompts();
|
|
566
567
|
await ensureGitHubRepositories(resolvedOptions, true);
|
|
@@ -599,10 +600,10 @@ async function main() {
|
|
|
599
600
|
outro(`Removed module ${options.moduleName} from source repo ${options.repoPath}.`);
|
|
600
601
|
return;
|
|
601
602
|
}
|
|
602
|
-
const options = { target:
|
|
603
|
+
const options = { target: cwd, stage: true };
|
|
603
604
|
await confirmSafeResetFromMenu(options);
|
|
604
605
|
await safeResetEnvironment(options);
|
|
605
|
-
outro(`Safe reset refreshed generated environment files in ${
|
|
606
|
+
outro(`Safe reset refreshed generated environment files in ${cwd}.`);
|
|
606
607
|
return;
|
|
607
608
|
}
|
|
608
609
|
catch (error) {
|
|
@@ -682,12 +683,12 @@ async function main() {
|
|
|
682
683
|
throw new Error('Usage: wpmoo doctor');
|
|
683
684
|
}
|
|
684
685
|
console.log(renderBanner());
|
|
685
|
-
console.log(await runDoctor(
|
|
686
|
+
console.log(await runDoctor(cwd));
|
|
686
687
|
return;
|
|
687
688
|
}
|
|
688
689
|
if (isDailyActionCommand(route.command)) {
|
|
689
690
|
console.log(renderBanner());
|
|
690
|
-
await runDailyAction(route.command, route.argv);
|
|
691
|
+
await runDailyAction(route.command, route.argv, cwd);
|
|
691
692
|
return;
|
|
692
693
|
}
|
|
693
694
|
const options = optionsFromArgs(route.argv);
|
|
@@ -711,8 +712,10 @@ async function main() {
|
|
|
711
712
|
}
|
|
712
713
|
outro(`Created Odoo dev overlay in ${resolvedOptions.target}. Review staged changes, then commit.`);
|
|
713
714
|
}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
715
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
716
|
+
runCli().catch((error) => {
|
|
717
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
718
|
+
console.error(message);
|
|
719
|
+
process.exit(1);
|
|
720
|
+
});
|
|
721
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wpmoo/odoo",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.45",
|
|
4
4
|
"description": "WPMoo Odoo lifecycle tooling for development, staging, and production workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"url": "https://github.com/wpmoo-org/wpmoo-odoo/issues"
|
|
13
13
|
},
|
|
14
14
|
"readmeFilename": "README.md",
|
|
15
|
+
"main": "./dist/cli.js",
|
|
16
|
+
"exports": "./dist/cli.js",
|
|
15
17
|
"keywords": [
|
|
16
18
|
"odoo",
|
|
17
19
|
"odoo development",
|