@azure-net/cli 2.1.3 → 2.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-net/cli",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "azure-net": "bin/azure-net.js"
@@ -35,13 +35,13 @@ export interface I{{name}}UpdateRequest {
35
35
  }`;
36
36
 
37
37
  const repositoryTemplate = `import { {{datasource}} } from '{{datasourceImport}}';
38
- import type { I{{name}} } from '\${{context}}/Domain/{{name}}/Model';
39
38
  import type {
39
+ \tI{{name}},
40
40
  \tI{{name}}Collection,
41
41
  \tI{{name}}CollectionQuery,
42
42
  \tI{{name}}CreateRequest,
43
43
  \tI{{name}}UpdateRequest
44
- } from '\${{context}}/Domain/{{name}}/Ports';
44
+ } from '\${{context}}/Domain/{{name}}';
45
45
 
46
46
  export class {{name}}Repository {
47
47
  \tprivate endpoint = '{{endpoint}}';
@@ -4,7 +4,7 @@ import { selectContext, getContextPath, toPascalCase, getAvailableFiles, getAppl
4
4
  import { updateIndexTs, writeIfNotExists, updateCoreIndex } from '../../utils/fileUtils.js';
5
5
 
6
6
  const createSchemaTemplate = `import { {{schemaFactory}} } from '{{schemaImport}}';
7
- import type { I{{name}}CreateRequest } from '\${{context}}/Domain/{{entity}}/Ports';
7
+ import type { I{{name}}CreateRequest } from '\${{context}}/Domain/{{entity}}';
8
8
 
9
9
  export const Create{{name}}Schema = {{schemaFactory}}<I{{name}}CreateRequest>()
10
10
  \t.rules((rules) => ({
@@ -13,7 +13,7 @@ export const Create{{name}}Schema = {{schemaFactory}}<I{{name}}CreateRequest>()
13
13
  \t.create();`;
14
14
 
15
15
  const updateSchemaTemplate = `import { {{schemaFactory}} } from '{{schemaImport}}';
16
- import type { I{{name}}UpdateRequest } from '\${{context}}/Domain/{{entity}}/Ports';
16
+ import type { I{{name}}UpdateRequest } from '\${{context}}/Domain/{{entity}}';
17
17
 
18
18
  export const Update{{name}}Schema = {{schemaFactory}}<I{{name}}UpdateRequest>()
19
19
  \t.rules((rules) => ({
@@ -28,7 +28,7 @@ import type {
28
28
  \tI{{name}}CollectionQuery,
29
29
  \tI{{name}}CreateRequest,
30
30
  \tI{{name}}UpdateRequest
31
- } from '\${{context}}/Domain/{{name}}/Ports';
31
+ } from '\${{context}}/Domain/{{name}}';
32
32
 
33
33
  export const {{name}}Presenter = {{presenterFactory}}('{{name}}Presenter', ({ createAsyncResource, createAsyncAction }) => {
34
34
  \tconst { {{serviceName}} } = ApplicationProvider();
@@ -58,7 +58,7 @@ import type {
58
58
  \tI{{name}}CollectionQuery,
59
59
  \tI{{name}}CreateRequest,
60
60
  \tI{{name}}UpdateRequest
61
- } from '\${{context}}/Domain/{{name}}/Ports';
61
+ } from '\${{context}}/Domain/{{name}}';
62
62
 
63
63
  export const {{name}}Presenter = createPresenter('{{name}}Presenter', () => {
64
64
  \tconst { {{serviceName}} } = ApplicationProvider();
@@ -5,7 +5,7 @@ import { selectContext, getContextPath, toPascalCase, getAvailableFiles } from '
5
5
  import { writeIfNotExists, updateIndexTs } from '../../utils/fileUtils.js';
6
6
 
7
7
  const schemaWithCoreTemplate = `import { {{coreSchema}} } from '\$core/Schema';
8
- import type { I{{name}}Request } from '\${{context}}/Domain/Ports/{{entity}}';
8
+ import type { I{{name}}Request } from '\${{context}}/Domain/{{entity}}';
9
9
 
10
10
  export const {{name}}Schema = {{coreSchema}}<I{{name}}Request>()
11
11
  \t.rules((rules) => ({
@@ -15,7 +15,7 @@ export const {{name}}Schema = {{coreSchema}}<I{{name}}Request>()
15
15
 
16
16
  const schemaWithPackageTemplate = `import { createSchemaFactory } from '@azure-net/kit';
17
17
  import { createRules, validationMessagesI18n } from '@azure-net/kit/schema';
18
- import type { I{{name}}Request } from '\${{context}}/Domain/Ports/{{entity}}';
18
+ import type { I{{name}}Request } from '\${{context}}/Domain/{{entity}}';
19
19
 
20
20
  const Schema = createSchemaFactory(createRules(validationMessagesI18n));
21
21
 
@@ -8,8 +8,8 @@ export async function loadUserConfig() {
8
8
  return userConfig.default || {};
9
9
  } catch {
10
10
  return {
11
- contexts: ['public'],
12
- defaultContext: 'public'
11
+ contexts: ['web'],
12
+ defaultContext: 'web'
13
13
  };
14
14
  }
15
15
  }