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

Add automation for linting and code gen for Extension package #3146

Merged
merged 86 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from 83 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
fadf532
Added extensions project
SpencerWBarnes Nov 17, 2021
b092fad
Added extension changes to core-frontend
SpencerWBarnes Nov 17, 2021
55a0e5d
Added extension test placeholder
SpencerWBarnes Nov 17, 2021
a954194
Added extension ui-test-app
SpencerWBarnes Nov 17, 2021
aa69613
Merge branch 'master' into spencer/new-extension-api
SpencerWBarnes Nov 18, 2021
526886c
Set new extension exports to alpha
SpencerWBarnes Nov 19, 2021
ef43e15
Change logs
SpencerWBarnes Nov 19, 2021
ad87b43
Added extension package documentation
SpencerWBarnes Nov 19, 2021
7b92d0f
Updated code owners and removed unused test
SpencerWBarnes Nov 22, 2021
c609849
Merge branch 'master' into spencer/new-extension-api
SpencerWBarnes Nov 22, 2021
f651ce1
Extract-api
SpencerWBarnes Nov 22, 2021
e034271
Reverted changes to appui-react api
SpencerWBarnes Nov 23, 2021
62f755a
Merge branch 'master' into spencer/new-extension-api
SpencerWBarnes Dec 3, 2021
3b6b2d6
Removed some common types from extension access
SpencerWBarnes Dec 3, 2021
e0301c4
Removed some frontend types from extensions
SpencerWBarnes Dec 3, 2021
88cb29d
Added real frontend functions
SpencerWBarnes Dec 8, 2021
494bf79
Added more frontend exports
SpencerWBarnes Dec 8, 2021
0e2dc12
Removed real ToolSettings
SpencerWBarnes Dec 9, 2021
87a4272
Merge branch 'master' into spencer/new-extension-api
SpencerWBarnes Dec 9, 2021
b911de6
Updated extensions to beta
SpencerWBarnes Dec 9, 2021
f4ae307
Removed broken link to extension docs
SpencerWBarnes Dec 9, 2021
5ed6bd9
Removed commented-out code
SpencerWBarnes Dec 10, 2021
f18856d
Simplified extension test tool
SpencerWBarnes Dec 10, 2021
46a0544
Initial work
SpencerWBarnes Jan 27, 2022
2311343
Added tags for core-common enums
SpencerWBarnes Jan 27, 2022
4321d92
Added tags for half core-common interfaces
SpencerWBarnes Jan 27, 2022
b93f118
Added tags to half core-common interfaces
SpencerWBarnes Jan 27, 2022
c4d0980
Added tags to core-common types
SpencerWBarnes Jan 27, 2022
69d5ceb
Added tags to frontend and common reals
SpencerWBarnes Jan 27, 2022
bc7fdb0
Added tags to core-frontend interfaces
SpencerWBarnes Jan 27, 2022
b2c8161
Added tags to core-frontend types
SpencerWBarnes Jan 27, 2022
e362608
Added tags to core-frontend enums
SpencerWBarnes Jan 28, 2022
50c24c9
Added tags to core-frontend types
SpencerWBarnes Jan 28, 2022
74e4c5f
Added tag to core-frontend namespace
SpencerWBarnes Jan 28, 2022
0ab4b82
Added more tags and extension api command
SpencerWBarnes Feb 1, 2022
dd3dd59
Added d.ts an d.js code gen logic
SpencerWBarnes Feb 1, 2022
27a9fa0
Added extension real to ExtensionRuntime
SpencerWBarnes Feb 1, 2022
7faf3af
Merge branch 'master' into spencer/extension-code-gen
kckst8 Feb 28, 2022
9b2d8ee
update lock
kckst8 Feb 28, 2022
1cbcfbf
fix extension api generation tasks; re-generate
kckst8 Feb 28, 2022
7631e8c
Merge branch 'master' into spencer/extension-code-gen
kckst8 Feb 28, 2022
a4b1802
update lock file
kckst8 Feb 28, 2022
d049d30
changes
kckst8 Feb 28, 2022
28497d4
extract api
kckst8 Feb 28, 2022
5fb084f
remove references to preview tags
kckst8 Feb 28, 2022
665727c
update approved packages
kckst8 Mar 1, 2022
0427325
rename extensionApi tag extensions
kckst8 Mar 1, 2022
8b1544d
fix typo
kckst8 Mar 2, 2022
d93debb
fix find/replace mishap
kckst8 Mar 3, 2022
2384b82
remove extra unnecessary types
kckst8 Mar 4, 2022
fc65024
only export @public and @extension tags (no @beta)
johnnyd710 Mar 7, 2022
3507120
remove all REAL comments - default to a value export if not a type or…
johnnyd710 Mar 8, 2022
ae6ca3b
eslint extension support for the @ preview tag, overruling any other …
johnnyd710 Mar 8, 2022
8f8f9a8
items with the preview tag are in a separate export
johnnyd710 Mar 8, 2022
64c32bc
avoid circular dependencies as a result of ExtensionRuntime.ts genera…
johnnyd710 Mar 9, 2022
d5156a5
generate ExtensionRuntime.ts but keep ExtensionHost as manual exception
johnnyd710 Mar 10, 2022
9c98328
move types into Extension.ts
johnnyd710 Mar 10, 2022
52203d2
declare ExtensionHost class types
johnnyd710 Mar 10, 2022
3ed5326
check length of array - not the array itself
johnnyd710 Mar 10, 2022
3fe5ae0
removed extensions barrel, use Extension.ts instead
johnnyd710 Mar 10, 2022
11fafb6
add preview to valid tags list, small comment fixes
johnnyd710 Mar 11, 2022
bc5ec8a
combine extract-extension-api and extract-api scripts in package.json
johnnyd710 Mar 11, 2022
d6fb1b4
fixed circular dependency issues preventing extensions from working
johnnyd710 Mar 21, 2022
83419ea
syntaxFriendlyNames now matches up with the type names we publish to …
johnnyd710 Mar 21, 2022
5f4f04c
separate eslint config file to only check specific rule
johnnyd710 Mar 22, 2022
ce82d29
Merge remote-tracking branch 'origin' into spencer/extension-code-gen
johnnyd710 Mar 29, 2022
348fa71
regenerate pnpm lock file
johnnyd710 Mar 29, 2022
d6ef097
add ViewClipTool, ViewClipDecorationProvider, and ViewClipClearTool t…
johnnyd710 Mar 29, 2022
03ce175
change beta tag to preview in core common
johnnyd710 Mar 29, 2022
8ad4820
formatting
johnnyd710 Mar 30, 2022
4c1011b
rush extract-api
johnnyd710 Mar 30, 2022
8a6a6fb
remove isLocalFile() and helper functions and use all declarationList…
johnnyd710 Mar 30, 2022
af6c67e
add ViewClipTools to initial extension api
johnnyd710 Mar 30, 2022
5c5c551
import.meta.url causing issues
johnnyd710 Mar 30, 2022
c79c2b2
Merge branch 'master' into spencer/extension-code-gen
johnnyd710 Mar 31, 2022
87cc619
eslint rule for namespace members
johnnyd710 Mar 31, 2022
2732af2
Merge branch 'master' into spencer/extension-code-gen
johnnyd710 Mar 31, 2022
d10d8ab
remove unnecessary code
johnnyd710 Apr 5, 2022
60ae234
keep quantity-formatting set together
johnnyd710 Apr 5, 2022
742333a
manually add copyright header
johnnyd710 Apr 5, 2022
6fc2df3
rm eslintrc, fix DISABLE_ELSINT_PLUGIN env var name
aruniverse Apr 6, 2022
36b0d9a
revert
aruniverse Apr 6, 2022
36d7793
added initial documentation for how to use extensions tag
johnnyd710 Apr 7, 2022
56cc1f9
iTwin.js not iTwinjs
johnnyd710 Apr 7, 2022
c21d78e
Merge branch 'master' into spencer/extension-code-gen
johnnyd710 Apr 7, 2022
66eb837
revert react-redux from 7.2.8 to 7.2.6 in appui-react
johnnyd710 Apr 7, 2022
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
13 changes: 12 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,18 @@
"--timeout 50000" // for easier debugging
],
"console": "integratedTerminal",
}
},
{
"name": "Extension API Generator",
"cwd": "${workspaceFolder}/core/extension/",
"type": "pwa-node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"generate"
],
},
],
"compounds": [
{
Expand Down
52 changes: 1 addition & 51 deletions common/api/core-frontend.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import { CodeSpec } from '@itwin/core-common';
import { ColorDef } from '@itwin/core-common';
import { ColorDefProps } from '@itwin/core-common';
import { ColorIndex } from '@itwin/core-common';
import { CommonToolbarItem } from '@itwin/appui-abstract';
import { CompressedId64Set } from '@itwin/core-bentley';
import { Constructor } from '@itwin/core-bentley';
import { ContentIdProvider } from '@itwin/core-common';
Expand Down Expand Up @@ -293,15 +292,12 @@ import { TileHeader } from '@itwin/core-common';
import { TileProps } from '@itwin/core-common';
import { TileReadStatus } from '@itwin/core-common';
import { TileVersionInfo } from '@itwin/core-common';
import { ToolbarOrientation } from '@itwin/appui-abstract';
import { ToolbarUsage } from '@itwin/appui-abstract';
import { Transform } from '@itwin/core-geometry';
import { TransformProps } from '@itwin/core-geometry';
import { TransientIdSequence } from '@itwin/core-bentley';
import { Tweens } from '@itwin/core-common';
import { TxnNotifications } from '@itwin/core-common';
import { UiAdmin } from '@itwin/appui-abstract';
import { UiItemsProvider } from '@itwin/appui-abstract';
import { UnitConversion } from '@itwin/core-quantity';
import { UnitProps } from '@itwin/core-quantity';
import { UnitsProvider } from '@itwin/core-quantity';
Expand Down Expand Up @@ -1027,10 +1023,7 @@ export enum ACSType {
}

// @alpha (undocumented)
export enum ActivationEvent {
// (undocumented)
onStartup = "onStartup"
}
export type ActivationEvent = "onStartup";

// @public
export class ActivityMessageDetails {
Expand Down Expand Up @@ -3098,40 +3091,6 @@ export enum EventHandled {
Yes = 1
}

// @alpha
export class ExtensionAdmin {
constructor();
addBuildExtension(manifestPromise: Promise<BuildExtensionManifest>, mainFunc?: ResolveFunc): Promise<void>;
addExtensionLoader(extensionLoader: ExtensionLoader): void;
addExtensionLoaderFront(extensionLoader: ExtensionLoader): void;
// @internal
onStartup: () => Promise<void>;
}

// @alpha
export class ExtensionHost {
protected constructor();
// (undocumented)
static get accuSnap(): AccuSnap;
// (undocumented)
static get locateManager(): ElementLocateManager;
// (undocumented)
static get notifications(): NotificationManager;
// (undocumented)
static get renderSystem(): RenderSystem;
// (undocumented)
static get toolAdmin(): ToolAdmin;
// (undocumented)
static get viewManager(): ViewManager;
}

// @alpha (undocumented)
export class ExtensionImpl {
constructor(_id: string);
// (undocumented)
registerTool(tool: ToolType, onRegistered?: () => any): Promise<void>;
}

// @alpha
export interface ExtensionLoader {
downloadExtension(arg: ExtensionLoaderProps): Promise<LocalExtensionProps>;
Expand Down Expand Up @@ -11750,15 +11709,6 @@ export interface ToolAssistanceSection {
// @public (undocumented)
export type ToolList = ToolType[];

// @alpha (undocumented)
export class ToolProvider implements UiItemsProvider {
constructor(tool: ToolType);
// (undocumented)
readonly id: string;
// (undocumented)
provideToolbarButtonItems(_stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation): CommonToolbarItem[];
}

// @public
export class ToolRegistry {
create(toolId: string, ...args: any[]): Tool | undefined;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/build-tools",
"comment": "Add extension API generation",
"type": "none"
}
],
"packageName": "@itwin/build-tools"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-common",
"comment": "Add extension API generation",
"type": "none"
}
],
"packageName": "@itwin/core-common"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-extension",
"comment": "Add extension API generation",
"type": "none"
}
],
"packageName": "@itwin/core-extension"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-frontend",
"comment": "Add extension API generation",
"type": "none"
}
],
"packageName": "@itwin/core-frontend"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/eslint-plugin",
"comment": "Add extension API generation",
"type": "none"
}
],
"packageName": "@itwin/eslint-plugin"
}
9 changes: 9 additions & 0 deletions common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
"ignoreMissingScript": true,
"ignoreDependencyOrder": true
},
{
"name": "extract-extension-api",
"commandKind": "bulk",
"summary": "Run eslint rule to generate extension API files",
"description": "Iterates through each package in the monorepo and runs the 'extract-extension-api' script",
"enableParallelism": true,
"ignoreMissingScript": true,
"ignoreDependencyOrder": true
},
{
"name": "lint",
"commandKind": "bulk",
Expand Down
Loading