@ordergroove/smi-serve 1.12.5 → 1.13.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.13.1](https://github.com/ordergroove/plush-toys/compare/@ordergroove/smi-serve@1.13.0...@ordergroove/smi-serve@1.13.1) (2026-04-02)
7
+
8
+ **Note:** Version bump only for package @ordergroove/smi-serve
9
+
10
+
11
+
12
+
13
+
14
+ # [1.13.0](https://github.com/ordergroove/plush-toys/compare/@ordergroove/smi-serve@1.12.5...@ordergroove/smi-serve@1.13.0) (2026-03-05)
15
+
16
+
17
+ ### Features
18
+
19
+ * call initializeCancelFlow in smi-serve ([ab0d05f](https://github.com/ordergroove/plush-toys/commit/ab0d05f91e1e6f1af22ca841135da55439082a03))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.12.5](https://github.com/ordergroove/plush-toys/compare/@ordergroove/smi-serve@1.12.4...@ordergroove/smi-serve@1.12.5) (2026-03-04)
7
26
 
8
27
 
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" ?>
2
2
  <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
3
- <coverage lines-valid="652" lines-covered="228" line-rate="0.3496" branches-valid="234" branches-covered="45" branch-rate="0.1923" timestamp="1772660095201" complexity="0" version="0.1">
3
+ <coverage lines-valid="656" lines-covered="228" line-rate="0.3475" branches-valid="234" branches-covered="45" branch-rate="0.1923" timestamp="1775161253547" complexity="0" version="0.1">
4
4
  <sources>
5
5
  <source>/home/jenkins/agent/workspace/Ordergroove_plush-toys_master/plush-toys/packages/smi-serve</source>
6
6
  </sources>
@@ -934,37 +934,37 @@
934
934
  </method>
935
935
  <method name="(anonymous_13)" hits="0" signature="()V">
936
936
  <lines>
937
- <line number="185" hits="0"/>
937
+ <line number="186" hits="0"/>
938
938
  </lines>
939
939
  </method>
940
940
  <method name="(anonymous_14)" hits="0" signature="()V">
941
941
  <lines>
942
- <line number="188" hits="0"/>
942
+ <line number="189" hits="0"/>
943
943
  </lines>
944
944
  </method>
945
945
  <method name="(anonymous_15)" hits="0" signature="()V">
946
946
  <lines>
947
- <line number="189" hits="0"/>
947
+ <line number="190" hits="0"/>
948
948
  </lines>
949
949
  </method>
950
950
  <method name="serve" hits="0" signature="()V">
951
951
  <lines>
952
- <line number="204" hits="0"/>
952
+ <line number="205" hits="0"/>
953
953
  </lines>
954
954
  </method>
955
955
  <method name="(anonymous_17)" hits="0" signature="()V">
956
956
  <lines>
957
- <line number="274" hits="0"/>
957
+ <line number="275" hits="0"/>
958
958
  </lines>
959
959
  </method>
960
960
  <method name="(anonymous_18)" hits="0" signature="()V">
961
961
  <lines>
962
- <line number="289" hits="0"/>
962
+ <line number="290" hits="0"/>
963
963
  </lines>
964
964
  </method>
965
965
  <method name="(anonymous_19)" hits="0" signature="()V">
966
966
  <lines>
967
- <line number="297" hits="0"/>
967
+ <line number="298" hits="0"/>
968
968
  </lines>
969
969
  </method>
970
970
  </methods>
@@ -1035,55 +1035,55 @@
1035
1035
  <line number="171" hits="0" branch="false"/>
1036
1036
  <line number="173" hits="0" branch="false"/>
1037
1037
  <line number="175" hits="0" branch="false"/>
1038
- <line number="186" hits="0" branch="false"/>
1039
1038
  <line number="187" hits="0" branch="false"/>
1040
- <line number="189" hits="0" branch="false"/>
1041
- <line number="191" hits="0" branch="true" condition-coverage="0% (0/5)"/>
1042
- <line number="192" hits="0" branch="false"/>
1039
+ <line number="188" hits="0" branch="false"/>
1040
+ <line number="190" hits="0" branch="false"/>
1041
+ <line number="192" hits="0" branch="true" condition-coverage="0% (0/5)"/>
1043
1042
  <line number="193" hits="0" branch="false"/>
1044
- <line number="201" hits="0" branch="false"/>
1045
- <line number="205" hits="0" branch="false"/>
1043
+ <line number="194" hits="0" branch="false"/>
1044
+ <line number="202" hits="0" branch="false"/>
1046
1045
  <line number="206" hits="0" branch="false"/>
1047
- <line number="208" hits="0" branch="false"/>
1046
+ <line number="207" hits="0" branch="false"/>
1048
1047
  <line number="209" hits="0" branch="false"/>
1049
1048
  <line number="210" hits="0" branch="false"/>
1050
- <line number="212" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1051
- <line number="213" hits="0" branch="false"/>
1052
- <line number="216" hits="0" branch="false"/>
1053
- <line number="218" hits="0" branch="false"/>
1049
+ <line number="211" hits="0" branch="false"/>
1050
+ <line number="213" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1051
+ <line number="214" hits="0" branch="false"/>
1052
+ <line number="217" hits="0" branch="false"/>
1054
1053
  <line number="219" hits="0" branch="false"/>
1055
1054
  <line number="220" hits="0" branch="false"/>
1056
- <line number="222" hits="0" branch="false"/>
1055
+ <line number="221" hits="0" branch="false"/>
1057
1056
  <line number="223" hits="0" branch="false"/>
1058
- <line number="226" hits="0" branch="false"/>
1059
- <line number="257" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1060
- <line number="258" hits="0" branch="false"/>
1061
- <line number="261" hits="0" branch="false"/>
1062
- <line number="263" hits="0" branch="false"/>
1063
- <line number="266" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1064
- <line number="267" hits="0" branch="false"/>
1065
- <line number="274" hits="0" branch="false"/>
1057
+ <line number="224" hits="0" branch="false"/>
1058
+ <line number="227" hits="0" branch="false"/>
1059
+ <line number="258" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1060
+ <line number="259" hits="0" branch="false"/>
1061
+ <line number="262" hits="0" branch="false"/>
1062
+ <line number="264" hits="0" branch="false"/>
1063
+ <line number="267" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1064
+ <line number="268" hits="0" branch="false"/>
1066
1065
  <line number="275" hits="0" branch="false"/>
1067
- <line number="280" hits="0" branch="false"/>
1068
- <line number="283" hits="0" branch="false"/>
1066
+ <line number="276" hits="0" branch="false"/>
1067
+ <line number="281" hits="0" branch="false"/>
1069
1068
  <line number="284" hits="0" branch="false"/>
1070
- <line number="286" hits="0" branch="false"/>
1071
- <line number="289" hits="0" branch="false"/>
1069
+ <line number="285" hits="0" branch="false"/>
1070
+ <line number="287" hits="0" branch="false"/>
1072
1071
  <line number="290" hits="0" branch="false"/>
1073
1072
  <line number="291" hits="0" branch="false"/>
1074
- <line number="294" hits="0" branch="false"/>
1075
- <line number="297" hits="0" branch="false"/>
1073
+ <line number="292" hits="0" branch="false"/>
1074
+ <line number="295" hits="0" branch="false"/>
1076
1075
  <line number="298" hits="0" branch="false"/>
1077
1076
  <line number="299" hits="0" branch="false"/>
1078
- <line number="303" hits="0" branch="false"/>
1079
- <line number="308" hits="0" branch="false"/>
1080
- <line number="309" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1081
- <line number="310" hits="0" branch="false"/>
1077
+ <line number="300" hits="0" branch="false"/>
1078
+ <line number="304" hits="0" branch="false"/>
1079
+ <line number="309" hits="0" branch="false"/>
1080
+ <line number="310" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1082
1081
  <line number="311" hits="0" branch="false"/>
1083
1082
  <line number="312" hits="0" branch="false"/>
1084
1083
  <line number="313" hits="0" branch="false"/>
1085
- <line number="315" hits="0" branch="false"/>
1086
- <line number="317" hits="1" branch="false"/>
1084
+ <line number="314" hits="0" branch="false"/>
1085
+ <line number="316" hits="0" branch="false"/>
1086
+ <line number="318" hits="1" branch="false"/>
1087
1087
  </lines>
1088
1088
  </class>
1089
1089
  <class name="utils.js" filename="src/utils.js" line-rate="0.4893" branch-rate="0.44439999999999996">
@@ -1319,9 +1319,9 @@
1319
1319
  <line number="61" hits="0"/>
1320
1320
  </lines>
1321
1321
  </method>
1322
- <method name="waitForScriptToLoad" hits="0" signature="()V">
1322
+ <method name="(anonymous_4)" hits="0" signature="()V">
1323
1323
  <lines>
1324
- <line number="77" hits="0"/>
1324
+ <line number="69" hits="0"/>
1325
1325
  </lines>
1326
1326
  </method>
1327
1327
  <method name="(anonymous_5)" hits="0" signature="()V">
@@ -1329,9 +1329,19 @@
1329
1329
  <line number="78" hits="0"/>
1330
1330
  </lines>
1331
1331
  </method>
1332
- <method name="(anonymous_6)" hits="0" signature="()V">
1332
+ <method name="waitForScriptToLoad" hits="0" signature="()V">
1333
1333
  <lines>
1334
- <line number="81" hits="0"/>
1334
+ <line number="84" hits="0"/>
1335
+ </lines>
1336
+ </method>
1337
+ <method name="(anonymous_7)" hits="0" signature="()V">
1338
+ <lines>
1339
+ <line number="85" hits="0"/>
1340
+ </lines>
1341
+ </method>
1342
+ <method name="(anonymous_8)" hits="0" signature="()V">
1343
+ <lines>
1344
+ <line number="88" hits="0"/>
1335
1345
  </lines>
1336
1346
  </method>
1337
1347
  </methods>
@@ -1355,15 +1365,19 @@
1355
1365
  <line number="62" hits="0" branch="false"/>
1356
1366
  <line number="63" hits="0" branch="false"/>
1357
1367
  <line number="64" hits="0" branch="false"/>
1358
- <line number="68" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1359
- <line number="70" hits="0" branch="false"/>
1360
- <line number="73" hits="0" branch="false"/>
1368
+ <line number="69" hits="0" branch="false"/>
1369
+ <line number="70" hits="0" branch="true" condition-coverage="0% (0/2)"/>
1370
+ <line number="72" hits="0" branch="false"/>
1371
+ <line number="75" hits="0" branch="false"/>
1361
1372
  <line number="78" hits="0" branch="false"/>
1362
1373
  <line number="79" hits="0" branch="false"/>
1363
1374
  <line number="80" hits="0" branch="false"/>
1364
- <line number="81" hits="0" branch="false"/>
1365
- <line number="82" hits="0" branch="false"/>
1366
- <line number="84" hits="0" branch="false"/>
1375
+ <line number="85" hits="0" branch="false"/>
1376
+ <line number="86" hits="0" branch="false"/>
1377
+ <line number="87" hits="0" branch="false"/>
1378
+ <line number="88" hits="0" branch="false"/>
1379
+ <line number="89" hits="0" branch="false"/>
1380
+ <line number="91" hits="0" branch="false"/>
1367
1381
  </lines>
1368
1382
  </class>
1369
1383
  </classes>
@@ -1,7 +1,7 @@
1
1
  ---------------------|---------|----------|---------|---------|-------------------------------------------------------------------------
2
2
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
3
3
  ---------------------|---------|----------|---------|---------|-------------------------------------------------------------------------
4
- All files | 34.71 | 19.23 | 26.4 | 34.96 |
4
+ All files | 34.46 | 19.23 | 25.98 | 34.75 |
5
5
  src | 36.61 | 21.84 | 27.96 | 36.89 |
6
6
  auth-monitor.js | 12 | 0 | 0 | 12 | 12-127
7
7
  auth.js | 93.33 | 83.33 | 100 | 93.33 | 14
@@ -12,9 +12,9 @@ All files | 34.71 | 19.23 | 26.4 | 34.96 |
12
12
  pull-theme.js | 77.77 | 56.25 | 93.75 | 76.84 | 25-28,37-38,69-70,77,94,102-103,117,130,145,156-157,163-166,178,234-239
13
13
  push-theme.js | 0 | 0 | 0 | 0 | 1-130
14
14
  select-merchant.js | 50 | 35.29 | 22.22 | 55.88 | 19,31,38,43-81
15
- serve.js | 13.04 | 0 | 0 | 13.04 | 15-43,56-81,85-155,159-315
15
+ serve.js | 13.04 | 0 | 0 | 13.04 | 15-43,56-81,85-155,159-316
16
16
  utils.js | 47.91 | 44.44 | 36.84 | 48.93 | 13,23-31,40,53-70,81-94,104,141-145,154-158,169-174,194-196
17
17
  src/partials | 0 | 0 | 0 | 0 |
18
18
  devmode.js | 0 | 0 | 100 | 0 | 4-21
19
- entrypoint.js | 0 | 0 | 0 | 0 | 6-84
19
+ entrypoint.js | 0 | 0 | 0 | 0 | 6-91
20
20
  ---------------------|---------|----------|---------|---------|-------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ordergroove/smi-serve",
3
- "version": "1.12.5",
3
+ "version": "1.13.1",
4
4
  "description": "Utility to serve a Subscription Manager template locally",
5
5
  "keywords": [],
6
6
  "author": "Eugenio Lattanzio <eugenio.lattanzio@ordergroove.com>",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "homepage": "https://github.com/ordergroove/plush-toys/tree/master/packages/smi-serve#readme",
23
23
  "dependencies": {
24
- "@ordergroove/smi-precompile": "^1.12.3",
24
+ "@ordergroove/smi-precompile": "^1.12.4",
25
25
  "adm-zip": "^0.5.10",
26
26
  "esbuild": "^0.19.2",
27
27
  "esbuild-plugin-less": "^1.2.4",
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "memfs": "^4.8.2"
36
36
  },
37
- "gitHead": "3ff31e125a6bfe71d120e3fcc1e1056e8d6aa416"
37
+ "gitHead": "ff509c75f836c9e6663fa6bb9b04515a4a5ac4c7"
38
38
  }
@@ -65,13 +65,20 @@ if (!window.og?.smi) {
65
65
  });
66
66
  }
67
67
 
68
+ let cancelFlowPromise;
69
+ let defaultCancelFlowConfigPromise = fetch(`${cancelFlowsUrl}/default-config.json`).then(response => response.json());
68
70
  if (use_local_assets) {
69
71
  // smi-serve builds cancel-flow as an ES Module
70
- import(`${cancelFlowsUrl}/cancel-flow.js`);
72
+ cancelFlowPromise = import(`${cancelFlowsUrl}/cancel-flow.js`);
71
73
  } else {
72
74
  // When loaded from SOS, cancel-flow is an IIFE bundle
73
- waitForScriptToLoad(`${cancelFlowsUrl}/cancel-flow.js`);
75
+ cancelFlowPromise = waitForScriptToLoad(`${cancelFlowsUrl}/cancel-flow.js`);
74
76
  }
77
+
78
+ cancelFlowPromise.then(async () => {
79
+ const defaultConfig = await defaultCancelFlowConfigPromise;
80
+ window.og.cancelFlow.initializeCancelFlow(defaultConfig);
81
+ });
75
82
  }
76
83
 
77
84
  async function waitForScriptToLoad(src) {
package/src/serve.js CHANGED
@@ -168,7 +168,7 @@ const getPlugins = async (argv, globals) => {
168
168
  // we need to copy over their build plugins for consistency
169
169
 
170
170
  const { createEsmRemapPlugin } = require('../../../build-tools.js');
171
- const { createLessInjectorPlugin } = require('../../cancel-flow/build.js');
171
+ const { createLessInjectorPlugin, createConfigJsonPlugin } = require('../../cancel-flow/build.js');
172
172
 
173
173
  const smiCoreRequire = createRequire(path.join(__dirname, '../../smi-core', 'package.json'));
174
174
 
@@ -178,6 +178,7 @@ const getPlugins = async (argv, globals) => {
178
178
  pathFilter: /cancel-flow/,
179
179
  cssOutputPath: path.join(cwd, outdir, 'cancel-flow', 'styles.css')
180
180
  }),
181
+ createConfigJsonPlugin({ outputPath: path.join(cwd, outdir, 'cancel-flow', 'default-config.json') }),
181
182
  devModePlugin,
182
183
  less,
183
184
  {