@open-mercato/carrier-inpost 1.0.0-develop.10.831f51b807 → 1.0.0-develop.11.d694a75880
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.
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
const metadata = {
|
|
2
|
-
|
|
2
|
+
name: "carrier_inpost",
|
|
3
3
|
title: "InPost Carrier",
|
|
4
|
-
description: "Ship parcels via InPost lockers (Paczkomat) and courier delivery with tracking and webhook updates."
|
|
4
|
+
description: "Ship parcels via InPost lockers (Paczkomat) and courier delivery with tracking and webhook updates.",
|
|
5
|
+
ejectable: true
|
|
5
6
|
};
|
|
7
|
+
import { features } from "./acl.js";
|
|
8
|
+
var carrier_inpost_default = metadata;
|
|
6
9
|
export {
|
|
10
|
+
carrier_inpost_default as default,
|
|
11
|
+
features,
|
|
7
12
|
metadata
|
|
8
13
|
};
|
|
9
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/modules/carrier_inpost/index.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { ModuleInfo } from '@open-mercato/shared/modules/registry'\n\nexport const metadata: ModuleInfo = {\n name: 'carrier_inpost',\n title: 'InPost Carrier',\n description: 'Ship parcels via InPost lockers (Paczkomat) and courier delivery with tracking and webhook updates.',\n ejectable: true,\n}\n\nexport { features } from './acl'\n\nexport default metadata\n"],
|
|
5
|
+
"mappings": "AAEO,MAAM,WAAuB;AAAA,EAClC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aAAa;AAAA,EACb,WAAW;AACb;AAEA,SAAS,gBAAgB;AAEzB,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/carrier-inpost",
|
|
3
|
-
"version": "1.0.0-develop.
|
|
3
|
+
"version": "1.0.0-develop.11.d694a75880",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"src",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
6
11
|
"scripts": {
|
|
7
12
|
"build": "node build.mjs",
|
|
13
|
+
"prepack": "node build.mjs",
|
|
8
14
|
"watch": "node watch.mjs",
|
|
9
15
|
"test": "jest --config jest.config.cjs",
|
|
10
16
|
"typecheck": "tsc --noEmit"
|
|
@@ -38,26 +44,26 @@
|
|
|
38
44
|
"./*/*/*.json": "./src/*/*/*.json",
|
|
39
45
|
"./*/*/*": {
|
|
40
46
|
"types": [
|
|
41
|
-
"./src
|
|
42
|
-
"./src
|
|
47
|
+
"./src/*/*/*.ts",
|
|
48
|
+
"./src/*/*/*.tsx"
|
|
43
49
|
],
|
|
44
|
-
"default": "./dist/*/*/*.
|
|
50
|
+
"default": "./dist/*/*/*.js"
|
|
45
51
|
},
|
|
46
52
|
"./*/*/*/*.json": "./src/*/*/*/*.json",
|
|
47
53
|
"./*/*/*/*": {
|
|
48
54
|
"types": [
|
|
49
|
-
"./src
|
|
50
|
-
"./src
|
|
55
|
+
"./src/*/*/*/*.ts",
|
|
56
|
+
"./src/*/*/*/*.tsx"
|
|
51
57
|
],
|
|
52
|
-
"default": "./dist
|
|
58
|
+
"default": "./dist/*/*/*/*.js"
|
|
53
59
|
},
|
|
54
60
|
"./*/*/*/*/*.json": "./src/*/*/*/*/*.json",
|
|
55
61
|
"./*/*/*/*/*": {
|
|
56
62
|
"types": [
|
|
57
|
-
"./src
|
|
58
|
-
"./src
|
|
63
|
+
"./src/*/*/*/*/*.ts",
|
|
64
|
+
"./src/*/*/*/*/*.tsx"
|
|
59
65
|
],
|
|
60
|
-
"default": "./dist
|
|
66
|
+
"default": "./dist/*/*/*/*/*.js"
|
|
61
67
|
}
|
|
62
68
|
},
|
|
63
69
|
"dependencies": {
|
|
@@ -72,9 +78,9 @@
|
|
|
72
78
|
"react-dom": "^19.0.0"
|
|
73
79
|
},
|
|
74
80
|
"devDependencies": {
|
|
75
|
-
"@open-mercato/core": "0.
|
|
76
|
-
"@open-mercato/shared": "0.
|
|
77
|
-
"@open-mercato/ui": "0.
|
|
81
|
+
"@open-mercato/core": "0.6.3-develop.3778.1.25fdb35f2e",
|
|
82
|
+
"@open-mercato/shared": "0.6.3-develop.3778.1.25fdb35f2e",
|
|
83
|
+
"@open-mercato/ui": "0.6.3-develop.3778.1.25fdb35f2e",
|
|
78
84
|
"@playwright/test": "^1.58.2",
|
|
79
85
|
"@types/chance": "^1.1.7",
|
|
80
86
|
"@types/jest": "^30.0.0",
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { ModuleInfo } from '@open-mercato/shared/modules/registry'
|
|
2
|
+
|
|
3
|
+
export const metadata: ModuleInfo = {
|
|
4
|
+
name: 'carrier_inpost',
|
|
3
5
|
title: 'InPost Carrier',
|
|
4
6
|
description: 'Ship parcels via InPost lockers (Paczkomat) and courier delivery with tracking and webhook updates.',
|
|
7
|
+
ejectable: true,
|
|
5
8
|
}
|
|
9
|
+
|
|
10
|
+
export { features } from './acl'
|
|
11
|
+
|
|
12
|
+
export default metadata
|
package/build.mjs
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import * as esbuild from 'esbuild'
|
|
2
|
-
import { glob } from 'glob'
|
|
3
|
-
import { readFileSync, writeFileSync, existsSync } from 'node:fs'
|
|
4
|
-
import { dirname, join } from 'node:path'
|
|
5
|
-
import { fileURLToPath } from 'node:url'
|
|
6
|
-
|
|
7
|
-
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
8
|
-
|
|
9
|
-
const entryPoints = await glob('src/**/*.{ts,tsx}', {
|
|
10
|
-
cwd: __dirname,
|
|
11
|
-
ignore: ['**/__tests__/**', '**/*.test.ts', '**/*.test.tsx', '**/__integration__/**'],
|
|
12
|
-
absolute: true,
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
if (entryPoints.length === 0) {
|
|
16
|
-
console.error('No entry points found!')
|
|
17
|
-
process.exit(1)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
console.log(`Found ${entryPoints.length} entry points`)
|
|
21
|
-
|
|
22
|
-
const addJsExtension = {
|
|
23
|
-
name: 'add-js-extension',
|
|
24
|
-
setup(build) {
|
|
25
|
-
build.onEnd(async (result) => {
|
|
26
|
-
if (result.errors.length > 0) return
|
|
27
|
-
const outputFiles = await glob('dist/**/*.js', { cwd: __dirname, absolute: true })
|
|
28
|
-
for (const file of outputFiles) {
|
|
29
|
-
const fileDir = dirname(file)
|
|
30
|
-
let content = readFileSync(file, 'utf-8')
|
|
31
|
-
content = content.replace(
|
|
32
|
-
/from\s+["'](\.[^"']+)["']/g,
|
|
33
|
-
(match, path) => {
|
|
34
|
-
if (path.endsWith('.js') || path.endsWith('.json')) return match
|
|
35
|
-
const resolvedPath = join(fileDir, path)
|
|
36
|
-
if (existsSync(resolvedPath) && existsSync(join(resolvedPath, 'index.js'))) {
|
|
37
|
-
return `from "${path}/index.js"`
|
|
38
|
-
}
|
|
39
|
-
return `from "${path}.js"`
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
content = content.replace(
|
|
43
|
-
/import\s*\(\s*["'](\.[^"']+)["']\s*\)/g,
|
|
44
|
-
(match, path) => {
|
|
45
|
-
if (path.endsWith('.js') || path.endsWith('.json')) return match
|
|
46
|
-
const resolvedPath = join(fileDir, path)
|
|
47
|
-
if (existsSync(resolvedPath) && existsSync(join(resolvedPath, 'index.js'))) {
|
|
48
|
-
return `import("${path}/index.js")`
|
|
49
|
-
}
|
|
50
|
-
return `import("${path}.js")`
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
writeFileSync(file, content)
|
|
54
|
-
}
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
await esbuild.build({
|
|
60
|
-
entryPoints,
|
|
61
|
-
outdir: 'dist',
|
|
62
|
-
format: 'esm',
|
|
63
|
-
platform: 'node',
|
|
64
|
-
target: 'node18',
|
|
65
|
-
sourcemap: true,
|
|
66
|
-
jsx: 'automatic',
|
|
67
|
-
plugins: [addJsExtension],
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
console.log('carrier-inpost built successfully')
|
package/jest.config.cjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @type {import('jest').Config} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
preset: 'ts-jest',
|
|
4
|
-
testEnvironment: 'node',
|
|
5
|
-
watchman: false,
|
|
6
|
-
rootDir: '.',
|
|
7
|
-
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
|
8
|
-
transform: {
|
|
9
|
-
'^.+\\.(t|j)sx?$': [
|
|
10
|
-
'ts-jest',
|
|
11
|
-
{
|
|
12
|
-
tsconfig: {
|
|
13
|
-
jsx: 'react-jsx',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
testMatch: ['<rootDir>/src/**/__tests__/**/*.test.(ts|tsx)'],
|
|
19
|
-
passWithNoTests: true,
|
|
20
|
-
transformIgnorePatterns: [
|
|
21
|
-
'/node_modules/(?!@open-mercato/)',
|
|
22
|
-
],
|
|
23
|
-
}
|