@vtex/checkout 0.0.8 → 0.0.10
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/.next/BUILD_ID +1 -1
- package/.next/app.js +1 -1
- package/.next/build-manifest.json +26 -26
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.json +1 -1
- package/.next/server/chunks/400.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/cart.html +1 -1
- package/.next/server/pages/error.html +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/information.html +1 -1
- package/.next/server/pages/order-placed.html +1 -1
- package/.next/server/pages/payment.html +1 -1
- package/.next/server/pages/review.html +1 -1
- package/.next/server/pages/shipping.html +1 -1
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +26 -26
- package/.next/standalone/.next/prerender-manifest.json +1 -1
- package/.next/standalone/.next/server/chunks/400.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/pages/cart.html +1 -1
- package/.next/standalone/.next/server/pages/error.html +1 -1
- package/.next/standalone/.next/server/pages/index.html +1 -1
- package/.next/standalone/.next/server/pages/information.html +1 -1
- package/.next/standalone/.next/server/pages/order-placed.html +1 -1
- package/.next/standalone/.next/server/pages/payment.html +1 -1
- package/.next/standalone/.next/server/pages/review.html +1 -1
- package/.next/standalone/.next/server/pages/shipping.html +1 -1
- package/.next/standalone/.next/static/{d3rnv_PTmize_AfdZT0mQ → D39HhaRdycmVapGyJTwER}/_buildManifest.js +1 -1
- package/.next/standalone/.next/static/chunks/main-e2254fa47db149d4.js +57 -0
- package/.next/standalone/.next/static/chunks/mf-manifest.json +32 -32
- package/.next/standalone/.next/static/chunks/mf-stats.json +32 -32
- package/.next/standalone/.next/static/chunks/pages/{_app-9f47f29ca781c0d2.js → _app-5614585568072a7b.js} +4 -4
- package/.next/standalone/.next/static/chunks/pages/order-placed-bc02732f16535ebb.js +1 -0
- package/.next/standalone/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/standalone/.next/static/chunks/{webpack-9611ecf3bafb6ec9.js → webpack-a9c09a4cddf677b4.js} +1 -1
- package/.next/standalone/.next/static/css/{33cd250a1c4a6bb2.css → 6f48a3a477d7e03e.css} +1 -1
- package/.next/standalone/package.json +2 -2
- package/.next/trace +275 -272
- package/README.md +8 -29
- package/dist/commands/build.d.ts +9 -5
- package/dist/commands/build.js +26 -15
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/create.d.ts +10 -0
- package/dist/commands/create.js +34 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/dev.d.ts +11 -2
- package/dist/commands/dev.js +55 -100
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/bundler.d.ts +14 -0
- package/dist/lib/bundler.js +120 -0
- package/dist/lib/bundler.js.map +1 -0
- package/dist/lib/constants.d.ts +3 -2
- package/dist/lib/constants.js +3 -2
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/logger.d.ts +5 -0
- package/dist/lib/logger.js +12 -0
- package/dist/lib/logger.js.map +1 -0
- package/package.json +8 -5
- package/scripts/set-as-pristine.sh +2 -0
- package/template/package.template.json +11 -0
- package/template/src/HelloWorld.tsx +12 -0
- package/template/src/hello-world.css +6 -0
- package/template/src/index.tsx +6 -0
- package/template/tsconfig.json +18 -0
- package/.next/standalone/.next/static/chunks/main-0a2b108d0f6b9d42.js +0 -57
- package/.next/standalone/.next/static/chunks/pages/order-placed-19c94f6f42e62dae.js +0 -1
- package/.next/standalone/.next/static/chunks/polyfills-78c92fac7aa8fdd8.js +0 -1
- package/dist/commands/init.d.ts +0 -13
- package/dist/commands/init.js +0 -23
- package/dist/commands/init.js.map +0 -1
- /package/.next/standalone/.next/static/{d3rnv_PTmize_AfdZT0mQ → D39HhaRdycmVapGyJTwER}/_ssgManifest.js +0 -0
package/dist/lib/constants.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare const PACKAGE_PATH: string;
|
|
2
|
+
export declare const TEMPLATE_PATH: string;
|
|
3
|
+
export declare const PACKAGE_JSON_TEMPLATE = "package.template.json";
|
|
2
4
|
export declare const CORE_PATH: string;
|
|
3
5
|
export declare const STANDALONE_PATH: string;
|
|
4
6
|
export declare const CHECKOUTRC_PATH: string;
|
|
5
|
-
export declare const STATIC_TMP_FOLDER = "
|
|
6
|
-
export declare const CHECKOUT_PORT = 4301;
|
|
7
|
+
export declare const STATIC_TMP_FOLDER = "dist";
|
|
7
8
|
export declare const IS_DEBUGGING: boolean;
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
export const PACKAGE_PATH = path.resolve('node_modules', '@vtex', 'checkout');
|
|
3
|
+
export const TEMPLATE_PATH = path.resolve(PACKAGE_PATH, 'template');
|
|
4
|
+
export const PACKAGE_JSON_TEMPLATE = 'package.template.json';
|
|
3
5
|
export const CORE_PATH = path.resolve(PACKAGE_PATH, '.next');
|
|
4
6
|
export const STANDALONE_PATH = path.resolve(CORE_PATH, 'standalone');
|
|
5
7
|
export const CHECKOUTRC_PATH = path.resolve(PACKAGE_PATH, '.checkoutrc');
|
|
6
|
-
export const STATIC_TMP_FOLDER = '
|
|
7
|
-
export const CHECKOUT_PORT = 4301;
|
|
8
|
+
export const STATIC_TMP_FOLDER = 'dist';
|
|
8
9
|
export const IS_DEBUGGING = process.env.CHECKOUT_CLI_DEBUG === 'true';
|
|
9
10
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AACpE,MAAM,CAAC,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AAC7D,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACxC,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,KAAK,MAAM,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IS_DEBUGGING } from './constants.js';
|
|
2
|
+
const PREFIX = '[CHECKOUT]';
|
|
3
|
+
export const logger = {
|
|
4
|
+
info: (...args) => console.log(PREFIX, ...args),
|
|
5
|
+
error: (...args) => console.error(PREFIX, ...args),
|
|
6
|
+
debug: (...args) => {
|
|
7
|
+
if (IS_DEBUGGING) {
|
|
8
|
+
console.log(PREFIX, ...args);
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,MAAM,GAAG,YAAY,CAAC;AAE5B,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;IACtD,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;IACzD,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE;QACxB,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtex/checkout",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"author": "VTEX",
|
|
5
5
|
"bin": {
|
|
6
6
|
"checkout": "./bin/run.js"
|
|
@@ -22,10 +22,12 @@
|
|
|
22
22
|
"@babel/preset-typescript": "^7.24.7",
|
|
23
23
|
"@module-federation/enhanced": "0.6.4",
|
|
24
24
|
"webpack": "^5.90.0",
|
|
25
|
-
"ws": "^8.18.0"
|
|
25
|
+
"ws": "^8.18.0",
|
|
26
|
+
"cors": "2.8.5"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"@types/react": "^18.3.5"
|
|
29
|
+
"@types/react": "^18.3.5",
|
|
30
|
+
"@types/cors": "2.8.17"
|
|
29
31
|
},
|
|
30
32
|
"engines": {
|
|
31
33
|
"node": ">=18.0.0"
|
|
@@ -47,13 +49,14 @@
|
|
|
47
49
|
"topicSeparator": " "
|
|
48
50
|
},
|
|
49
51
|
"scripts": {
|
|
50
|
-
"cli": "./bin/dev.js",
|
|
51
52
|
"postinstall": "bash ./scripts/set-as-pristine.sh"
|
|
52
53
|
},
|
|
53
54
|
"types": "dist/index.d.ts",
|
|
54
55
|
"files": [
|
|
55
56
|
".next",
|
|
56
57
|
"dist",
|
|
57
|
-
"bin"
|
|
58
|
+
"bin",
|
|
59
|
+
"scripts",
|
|
60
|
+
"template"
|
|
58
61
|
]
|
|
59
62
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import './hello-world.css';
|
|
3
|
+
|
|
4
|
+
export const HelloWorld = () => {
|
|
5
|
+
const [count, setCount] = useState(0);
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<button className="hello-world-btn" onClick={() => setCount(count + 1)}>
|
|
9
|
+
Count: {count}
|
|
10
|
+
</button>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": ".",
|
|
4
|
+
"target": "es6",
|
|
5
|
+
"module": "esnext",
|
|
6
|
+
"lib": ["dom", "es2015"],
|
|
7
|
+
"allowJs": true,
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["src/**/*"],
|
|
17
|
+
"exclude": ["node_modules", "dist"]
|
|
18
|
+
}
|