@pacaf/wizard-ux 3.5.1 → 3.6.0

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,6 +1,6 @@
1
- // Step 8 - Connectors. Browser-native connector selection and optional data-source binding.
1
+ // Step 9 - Connectors. Browser-native connector selection and optional data-source binding.
2
2
  // Dataverse is NOT in this list and is never an opt-in toggle: every Code App is bound to
3
- // Dataverse at the environment level via the mandatory Dataverse URL captured in Step 2.
3
+ // Dataverse at the environment level via the mandatory Dataverse URL captured in Step 5.
4
4
  import { existsSync, readFileSync } from 'node:fs';
5
5
  import { execFileSync } from 'node:child_process';
6
6
  import { dirname, join, resolve } from 'node:path';
@@ -176,14 +176,14 @@ function dataverseRegistrationPlan(projectDir) {
176
176
  // Dataverse is always bound to a Code App — never optional. When planned tables exist and we
177
177
  // have a verified user PAC profile, register them now; otherwise emit clear, non-optional status.
178
178
  async function bindDataverse(log, { pac, projectDir, canRegister }) {
179
- log.info('Dataverse is always bound to this Code App at the environment level (the Dataverse URL you confirmed in Step 2). It is never optional.');
179
+ log.info('Dataverse is always bound to this Code App at the environment level (the Dataverse URL you confirmed in Step 5). It is never optional.');
180
180
  const { tables } = dataverseRegistrationPlan(projectDir);
181
181
  if (tables.length === 0) {
182
- log.info('No Dataverse tables are planned yet. Once your planning payload defines tables, register them with: npm run register:dataverse');
182
+ log.info('No Dataverse tables are planned yet. Once your planning payload defines tables, provision them with the Dataverse-skills plugin (dv-metadata), then register each with: pac code add-data-source -a dataverse -t <table>.');
183
183
  return [];
184
184
  }
185
185
  if (!canRegister || !pac) {
186
- log.info(`${tables.length} planned Dataverse table(s) found. Register them with: npm run register:dataverse (or pac code add-data-source -a dataverse -t <table>).`);
186
+ log.info(`${tables.length} planned Dataverse table(s) found. Provision them with the Dataverse-skills plugin (dv-metadata), then register each with: pac code add-data-source -a dataverse -t <table>.`);
187
187
  return [];
188
188
  }
189
189
  const registered = [];
@@ -245,9 +245,9 @@ function connectionIdFromAnswers(answers, connector) {
245
245
 
246
246
  export default {
247
247
  meta: {
248
- number: 8,
248
+ number: 9,
249
249
  title: 'Bind Connectors',
250
- description: 'Dataverse is always bound at the environment level (Step 2). Here you optionally choose additional connector references and register their data sources.',
250
+ description: 'Dataverse is always bound at the environment level (Step 5). Here you optionally choose additional connector references and register their data sources.',
251
251
  canRunInBrowser: true,
252
252
  optional: true,
253
253
  needsSecret: true,
@@ -288,7 +288,7 @@ export default {
288
288
  id: 'REGISTER_DATA_SOURCES',
289
289
  type: 'confirm',
290
290
  label: 'Register selected non-Dataverse connectors as Code App data sources now',
291
- help: 'Requires the user PAC auth profile from Step 4 and power.config.json from Step 7. Leave off to create solution connection references only.',
291
+ help: 'Requires the user PAC auth profile from Step 4 and power.config.json from Step 8. Leave off to create solution connection references only.',
292
292
  defaultValue: false,
293
293
  showIf: { id: 'DEFER_CONNECTORS', equals: false },
294
294
  });
@@ -303,7 +303,7 @@ export default {
303
303
  label: `Set up ${connectorLabel(connector, existingApiIds)}`,
304
304
  help: referenceExists
305
305
  ? 'This connector already has a connection reference in the selected solution. Leave on to keep it in this app setup.'
306
- : 'Creates a solution connection reference for this connector when you save Step 8.',
306
+ : 'Creates a solution connection reference for this connector when you save Step 9.',
307
307
  defaultValue: selectedDefaults.includes(connector.apiId),
308
308
  group,
309
309
  showIf: { id: 'DEFER_CONNECTORS', equals: false },
@@ -376,7 +376,7 @@ export default {
376
376
  CONNECTOR_BINDING_DEFERRED: true,
377
377
  CUSTOM_CONNECTORS: customRaw,
378
378
  },
379
- completedStep: 8,
379
+ completedStep: 9,
380
380
  };
381
381
  }
382
382
 
@@ -401,7 +401,7 @@ export default {
401
401
  if (selectedApiIds.length === 0) {
402
402
  log.info('No additional connectors selected. Dataverse is still bound automatically.');
403
403
  } else {
404
- if (!prefix) throw new Error('Publisher prefix is missing. Complete Step 5 before binding connectors.');
404
+ if (!prefix) throw new Error('Publisher prefix is missing. Complete Step 6 before binding connectors.');
405
405
  if (!solutionName) throw new Error('Solution unique name is missing. Complete Step 6 before binding connectors.');
406
406
 
407
407
  log.info('Checking existing connection references...');
@@ -444,7 +444,7 @@ export default {
444
444
  if (!pac) throw new Error('PAC CLI was not found. Install PAC CLI before registering data sources.');
445
445
 
446
446
  if (!existsSync(join(projectDir, 'power.config.json'))) {
447
- throw new Error(`power.config.json was not found in ${projectDir}. Complete Step 7 before registering data sources.`);
447
+ throw new Error(`power.config.json was not found in ${projectDir}. Complete Step 8 before registering data sources.`);
448
448
  }
449
449
 
450
450
  const credentialValues = isUserAuth ? null : resolveCredentialValues(state);
@@ -483,7 +483,7 @@ export default {
483
483
  CUSTOM_CONNECTORS: customRaw,
484
484
  CONNECTOR_CONNECTION_IDS: connectionIds,
485
485
  },
486
- completedStep: 8,
486
+ completedStep: 9,
487
487
  };
488
488
  },
489
489
  };
@@ -1,4 +1,4 @@
1
- // Step 9 - Verify & Deploy. Browser-native build and optional pac code push.
1
+ // Step 10 - Verify & Deploy. Browser-native build and optional pac code push.
2
2
  import { existsSync } from 'node:fs';
3
3
  import { spawn, execFileSync } from 'node:child_process';
4
4
  import { dirname, join, resolve } from 'node:path';
@@ -114,7 +114,7 @@ function verifyUserProfile(pac, projectDir, state, credentialValues) {
114
114
 
115
115
  export default {
116
116
  meta: {
117
- number: 9,
117
+ number: 10,
118
118
  title: 'Verify & Deploy',
119
119
  description: 'Build the project, optionally push it to Power Platform, and surface the live app URL when available.',
120
120
  canRunInBrowser: true,
@@ -146,20 +146,20 @@ export default {
146
146
 
147
147
  async apply(answers, state, log) {
148
148
  const projectDir = resolve(String(state.PROJECT_DIR || PROJECT_DIR));
149
- if (!existsSync(join(projectDir, 'package.json'))) throw new Error(`No package.json found in ${projectDir}. Run Step 7 first.`);
149
+ if (!existsSync(join(projectDir, 'package.json'))) throw new Error(`No package.json found in ${projectDir}. Run Step 8 first.`);
150
150
 
151
151
  log.info('Building project...');
152
152
  const buildOk = await runCommand(log, 'npm run build', { cwd: projectDir });
153
153
  const distExists = existsSync(join(projectDir, 'dist', 'index.html'));
154
154
  if (!buildOk || !distExists) {
155
155
  log.warn('Build did not produce dist/index.html. Fix build errors before deploying.');
156
- return { stateUpdate: { PROJECT_DIR: projectDir }, completedStep: 9 };
156
+ return { stateUpdate: { PROJECT_DIR: projectDir }, completedStep: 10 };
157
157
  }
158
158
  log.ok('Build succeeded and dist/index.html exists');
159
159
 
160
160
  if (answers.PUSH_TO_POWER_PLATFORM !== true) {
161
161
  log.info('Push skipped. You can deploy later from WizardUX or with pac code push.');
162
- return { stateUpdate: { PROJECT_DIR: projectDir }, completedStep: 9 };
162
+ return { stateUpdate: { PROJECT_DIR: projectDir }, completedStep: 10 };
163
163
  }
164
164
 
165
165
  if (answers.CODE_APPS_FEATURES_ENABLED !== true) {
@@ -240,6 +240,6 @@ export default {
240
240
  log.warn('Could not detect deployed app URL in pac output. Open the app from Power Apps Maker Portal.');
241
241
  }
242
242
 
243
- return { stateUpdate, completedStep: 9 };
243
+ return { stateUpdate, completedStep: 10 };
244
244
  },
245
245
  };
@@ -1,4 +1,4 @@
1
- // Step 10 — Add the Code App to your Solution (manual).
1
+ // Step 11 — Add the Code App to your Solution (manual).
2
2
  //
3
3
  // This is a MANUAL step, not a terminal/automation step. `pac code push -s`
4
4
  // only associates the Code App with a solution when that solution already
@@ -14,7 +14,7 @@
14
14
  // supplied to the frontend by GET /api/state (see routes/state.mjs).
15
15
  export default {
16
16
  meta: {
17
- number: 10,
17
+ number: 11,
18
18
  title: 'Add App to Solution',
19
19
  description:
20
20
  'Required manual step — open the Maker Portal and add your deployed Code App to your target solution.',
@@ -8,14 +8,15 @@ import step1 from './01-prerequisites.mjs';
8
8
  import step2 from './02-project-and-env.mjs';
9
9
  import step3 from './03-app-registration.mjs';
10
10
  import step4 from './04-auth-setup.mjs';
11
- import step5 from './05-publisher.mjs';
12
- import step6 from './06-solution.mjs';
13
- import step7 from './07-scaffold.mjs';
14
- import step8 from './08-connectors.mjs';
15
- import step9 from './09-verify-deploy.mjs';
16
- import step10 from './10-add-to-solution.mjs';
11
+ import step5 from './05-environments.mjs';
12
+ import step6 from './06-publisher.mjs';
13
+ import step7 from './07-solution.mjs';
14
+ import step8 from './08-scaffold.mjs';
15
+ import step9 from './09-connectors.mjs';
16
+ import step10 from './10-verify-deploy.mjs';
17
+ import step11 from './11-add-to-solution.mjs';
17
18
 
18
- export const STEPS = [step1, step2, step3, step4, step5, step6, step7, step8, step9, step10];
19
+ export const STEPS = [step1, step2, step3, step4, step5, step6, step7, step8, step9, step10, step11];
19
20
  export const TOTAL_STEPS = STEPS.length;
20
21
 
21
22
  export function getStep(n) {