Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding typespec-azure-portal-core package #224

Merged
merged 30 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3e03544
add portal library code
yejee94 Feb 6, 2024
124b85f
adding pnpm-lock.yaml file
yejee94 Feb 6, 2024
b90c5a4
Merge remote-tracking branch 'upstream/main' into yejeelee/azurePortal
yejee94 Feb 6, 2024
5981a31
Merge remote-tracking branch 'upstream/main' into yejeelee/azurePortal
yejee94 Feb 6, 2024
39da658
Merge branch 'yejeelee/azurePortal' of https://github.com/yejee94/typ…
yejee94 Feb 6, 2024
2b27fa5
ran chronus add
yejee94 Feb 6, 2024
94fcd7a
added portal-core lib to chronus.yaml
yejee94 Feb 6, 2024
a23ebe7
remove dup
yejee94 Feb 6, 2024
ec1a999
fixed
yejee94 Feb 6, 2024
b208af2
fixed
yejee94 Feb 6, 2024
e017c94
remove path
yejee94 Feb 6, 2024
5403230
remove path from package.json
yejee94 Feb 6, 2024
0280cd6
ran prettier --write
yejee94 Feb 6, 2024
c305d2e
Merge branch 'main' into yejeelee/azurePortal
yejee94 Feb 6, 2024
c9de064
Merge branch 'main' into yejeelee/azurePortal
yejee94 Feb 6, 2024
39e0c92
add core
yejee94 Feb 6, 2024
ca0d427
Merge branch 'yejeelee/azurePortal' of https://github.com/yejee94/typ…
yejee94 Feb 6, 2024
10b78e5
fixed based on feedback
yejee94 Feb 7, 2024
ba8313c
git pull main
yejee94 Feb 7, 2024
e5d1607
Merge branch 'main' into yejeelee/azurePortal
yejee94 Feb 7, 2024
215d343
added change to pnpm-lock.yaml
yejee94 Feb 7, 2024
e974827
Merge branch 'yejeelee/azurePortal' of https://github.com/yejee94/typ…
yejee94 Feb 7, 2024
69952c9
ran prettier
yejee94 Feb 7, 2024
aa23b8b
Merge branch 'main' into yejeelee/azurePortal
yejee94 Feb 7, 2024
788f5eb
update the dependencies
yejee94 Feb 7, 2024
1231897
added eslint
yejee94 Feb 7, 2024
ce05106
eslint added
yejee94 Feb 7, 2024
f9e24da
changed to Model from Options
yejee94 Feb 7, 2024
99549f9
fixed
yejee94 Feb 7, 2024
7db1d3f
fixed
yejee94 Feb 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chatty-bobcats-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@azure-tools/typespec-azure-portal-core": none
---

adding typespec-azure-portal-core lib
1 change: 1 addition & 0 deletions .chronus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ versionPolicies:
packages:
- "@azure-tools/typespec-autorest"
- "@azure-tools/typespec-azure-core"
- "@azure-tools/typespec-azure-portal-core"
- "@azure-tools/typespec-azure-resource-manager"
- "@azure-tools/typespec-client-generator-core"
ignore:
Expand Down
66 changes: 66 additions & 0 deletions packages/typespec-azure-portal-core/lib/decorators.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import "../dist/src/index.js";

using TypeSpec.Reflection;
namespace Azure.Portal;

/**
* Provides a Model describing about of ARM resource.
* @param options Property options allows more detailed infomation about the resourceType.
*/
extern dec about(target: Model, options: AboutOptions);

/**
* Provides a Model customizing browse view of ARM resource.
* @param options Property options provides browsing information of the resourceType.
*/
extern dec browse(target: Model, options: BrowseOptions);

/**
* Provides a Model marketplace offer information of ARM resource.
* @param options Property options provides marketplace offer information of the resourceType.
*/
extern dec marketplaceOffer(target: Model, options: marketplaceOfferOptions);

/**
* Provides a Model Property a display name
*/
extern dec displayName(target: ModelProperty, name: valueof string);

//extern dec essentials(target: ModelProperty);

//extern dec patternValidationMessage(target: ModelProperty, message: valueof string);

/** Options for browse of ARM resource. */
model BrowseOptions {
/** argQuery can be a literal string query or KQL file path.
* KQL query which represents all possible data for your desired browse view.
*/
argQuery?: string | FilePath;
}

/** File path of a file */
model FilePath {
/** File path of a file */
filePath: string;
}

/** Options for marketplaceOffer */
model marketplaceOfferOptions {
/** Marketplace offer id of a resource */
id?: string;
}

/** Options for about of ARM resource. */
model AboutOptions {
/** Icon which represent resource */
icon?: FilePath;

/** Display name which represent the resource */
displayName?: string;

/** Comma-separated set of words or phrases which allow users to search for your asset by identifiers. */
keywords?: string[];

/** Set of links which can help learn more about the resource */
learnMoreDocs?: string[];
}
1 change: 1 addition & 0 deletions packages/typespec-azure-portal-core/lib/main.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./decorators.tsp";
53 changes: 53 additions & 0 deletions packages/typespec-azure-portal-core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "@azure-tools/typespec-azure-portal-core",
"version": "1.0.0",
"description": "",
"scripts": {
"build": "tsc -p .",
"test": "vitest run",
"test:watch": "vitest -w",
"test-official": "vitest run --coverage --reporter=junit --reporter=default --no-file-parallelism"
},
"keywords": [
"Azure",
"Portal",
"TypeSpec"
],
"author": "",
"license": "MIT",
"type": "module",
"main": "dist/src/index.js",
"tspMain": "lib/main.tsp",
"peerDependencies": {
"@azure-tools/typespec-azure-resource-manager": "workspace:~0.38.0",
"@typespec/compiler": "~0.52.0"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "workspace:~0.38.1",
"@azure-tools/typespec-azure-core": "workspace:~0.38.0",
"@azure-tools/typespec-azure-resource-manager": "workspace:~0.38.0",
"@azure-tools/typespec-client-generator-core": "workspace:~0.38.0",
"@types/node": "~18.11.9",
"@typespec/compiler": "workspace:~0.52.0",
"@typespec/http": "workspace:~0.52.0",
"@typespec/openapi": "workspace:~0.52.0",
"@typespec/rest": "workspace:~0.52.0",
"@typespec/tspd": "workspace:~0.46.0",
"@typespec/versioning": "workspace:~0.52.0",
"@vitest/coverage-v8": "^1.1.0",
"c8": "~8.0.1",
"source-map-support": "~0.5.21",
"typescript": "~5.3.3",
"vitest": "^1.2.0"
},
"exports": {
".": {
"default": "./dist/src/index.js",
"types": "./dist/src/index.d.ts"
},
"./testing": {
"default": "./dist/src/testing/index.js",
"types": "./dist/src/testing/index.d.ts"
}
}
}
Loading
Loading