[ADF-3538] Alfresco Process Service Cloud - new package with CLI (#3872)

* [ADF-3538] start creating new folder for cloud components

* [ADF-3538] added new package to the script and the builds

* [ADF-3538] added some more changes to scripts

* [ADF-3538] - starting the new package

* change index

* fix package

* Fix module structure with Cli

* add basic structure

* Create a library with angular cli

* Add a cloud component as example

* Skip the scss style

* add the import scss

* remove useless codes

* Add i18n example

* remove useless code

* Simplify the hello component
Fix the wrong path

* Fix process service cloud path

* Download process-service-cloud from the CS
This commit is contained in:
Maurizio Vitale
2018-10-16 18:15:11 +01:00
committed by Eugenio Romano
parent 5378df9425
commit 0ecb6c13ec
57 changed files with 1540 additions and 1010 deletions

View File

@@ -42,6 +42,9 @@ jobs:
- stage: Unit test
env: STAGE=content-services
script: (./scripts/npm-build-all.sh -si -sb -t "content-services" --skip-lint|| exit 1;);
- stage: Unit test
env: STAGE=process-services-cloud
script: (./scripts/npm-build-all.sh -si -sb -t "process-services-cloud" --skip-lint|| exit 1;);
- stage: Unit test
env: STAGE=demo-shell
script: if ([ "$TRAVIS_BRANCH" = "master" ]); then
@@ -77,6 +80,9 @@ jobs:
- stage: e2e Test # Test content-services
env: STAGE=content-services
script: node ./scripts/download-build-in-cs.js --username "$E2E_USERNAME" --password "$E2E_PASSWORD" --host "$E2E_HOST" --folder $TRAVIS_BUILD_NUMBER; ./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b -save --folder content-services --skip-lint --use-dist --timeout 7000
- stage: e2e Test # Test process-services
env: STAGE=process-services-cloud
script: node ./scripts/download-build-in-cs.js --username "$E2E_USERNAME" --password "$E2E_PASSWORD" --host "$E2E_HOST" --folder $TRAVIS_BUILD_NUMBER; ./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b -save --folder process-services-cloud --skip-lint --use-dist --timeout 7000
- stage: e2e Test # Test insights
env: STAGE=insights
script: node ./scripts/download-build-in-cs.js --username "$E2E_USERNAME" --password "$E2E_PASSWORD" --host "$E2E_HOST" --folder $TRAVIS_BUILD_NUMBER; ./scripts/test-e2e-lib.sh -host localhost:4200 -proxy "$E2E_HOST" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e $E2E_EMAIL -b -save --folder insights --skip-lint --use-dist --timeout 7000

View File

@@ -56,6 +56,11 @@
"input": "node_modules/@alfresco/adf-process-services/bundles/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-process-services-cloud/bundles/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-content-services/bundles/assets",
@@ -174,6 +179,11 @@
"input": "node_modules/@alfresco/adf-process-services/bundles/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-process-services-cloud/bundles/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "node_modules/@alfresco/adf-content-services/bundles/assets",
@@ -267,6 +277,11 @@
"input": "lib/process-services/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "lib/process-services-cloud/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "lib/content-services/assets",
@@ -287,6 +302,11 @@
"input": "lib/process-services/i18n",
"output": "/assets/adf-process-services/i18n"
},
{
"glob": "**/*",
"input": "lib/process-services-cloud/src/lib/i18n",
"output": "/assets/adf-process-services-cloud/i18n"
},
{
"glob": "**/*",
"input": "lib/insights/i18n",
@@ -414,6 +434,11 @@
"input": "lib/process-services/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "lib/process-services-cloud/assets",
"output": "/assets"
},
{
"glob": "**/*",
"input": "lib/content-services/assets",
@@ -434,6 +459,11 @@
"input": "lib/process-services/i18n",
"output": "/assets/adf-process-services/i18n"
},
{
"glob": "**/*",
"input": "lib/process-services-cloud/src/lib/i18n",
"output": "/assets/adf-process-services-cloud/i18n"
},
{
"glob": "**/*",
"input": "lib/insights/i18n",
@@ -627,6 +657,46 @@
}
}
},
"process-services-cloud": {
"root": "lib/process-services-cloud",
"sourceRoot": "lib/process-services-cloud/src",
"projectType": "library",
"prefix": "adf-cloud",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "lib/process-services-cloud/tsconfig.lib.json",
"project": "lib/process-services-cloud/ng-package.json"
},
"configurations": {
"production": {
"project": "lib/process-services-cloud/ng-package.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "lib/process-services-cloud/src/test.ts",
"tsConfig": "lib/process-services-cloud/tsconfig.spec.json",
"karmaConfig": "lib/process-services-cloud/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"lib/process-services-cloud/tsconfig.lib.json",
"lib/process-services-cloud/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"insights": {
"root": "lib/insights",
"sourceRoot": "lib/insights/src",
@@ -707,14 +777,5 @@
}
}
},
"defaultProject": "dist",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
"defaultProject": "dist"
}

View File

@@ -44,6 +44,12 @@ install:
else
(cd scripts && sh npm-build-all.sh -t "core" -vjsapi alpha|| exit 1)
)
- if %COMPONENT_NAME% EQU process-service-cloud (
if %APPVEYOR_REPO_BRANCH EQU master
(cd scripts && sh npm-build-all.sh -t "process-services-cloud" || exit 1)
else
(cd scripts && sh npm-build-all.sh -t "process-services-cloud" -vjsapi alpha|| exit 1)
)
# - if %COMPONENT_NAME% EQU ng2-demo-shell (
# if %APPVEYOR_REPO_BRANCH EQU master
# (cd scripts && sh start.sh -t -ss || exit 1)

View File

@@ -63,6 +63,8 @@ import { ContentModule } from '@alfresco/adf-content-services';
import { InsightsModule } from '@alfresco/adf-insights';
import { ProcessModule } from '@alfresco/adf-process-services';
import { AuthBearerInterceptor } from './services';
import { ProcessServicesCloudModule } from '@alfresco/adf-process-services-cloud';
import { CloudComponent } from './components/cloud/cloud.component';
@NgModule({
imports: [
@@ -80,11 +82,13 @@ import { AuthBearerInterceptor } from './services';
ProcessModule.forRoot(),
ThemePickerModule,
ChartsModule,
MonacoEditorModule.forRoot()
MonacoEditorModule.forRoot(),
ProcessServicesCloudModule
],
declarations: [
AppComponent,
LoginComponent,
CloudComponent,
LogoutComponent,
AppLayoutComponent,
HomeComponent,

View File

@@ -40,9 +40,11 @@ import { FormLoadingComponent } from './components/form/form-loading.component';
import { DemoPermissionComponent } from './components/permissions/demo-permissions.component';
import { ReportIssueComponent } from './components/report-issue/report-issue.component';
import { AppComponent } from './app.component';
import { CloudComponent } from './components/cloud/cloud.component';
export const appRoutes: Routes = [
{ path: 'login', component: LoginComponent },
{ path: 'cloud', component: CloudComponent },
{ path: 'logout', component: LogoutComponent },
{
path: 'settings',

View File

@@ -0,0 +1,2 @@
<adf-cloud-hello></adf-cloud-hello>

View File

@@ -0,0 +1,32 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-cloud',
templateUrl: './cloud.component.html',
styleUrls: ['./cloud.component.scss']
})
export class CloudComponent implements OnInit {
constructor() {
}
ngOnInit() {
}
}

View File

@@ -4,6 +4,9 @@
<h1 class="mat-h1">ADF</h1>
<h2>{{ 'APP.HOME.TITLE' | translate}}</h2>
</div>
<adf-cloud-hello></adf-cloud-hello>
<div class="adf-home-start">
<a mat-raised-button class="adf-home-docs-button adf-primary-color" href="https://github.com/Alfresco/alfresco-ng2-components/tree/master/docs">{{ 'APP.HOME.DOCUMENTATION' | translate}}</a>
</div>

View File

@@ -8,6 +8,7 @@
@import '../../lib/process-services/styles/index';
@import '../../lib/insights/styles/index';
@import '../../lib/core/styles/index';
@import '../../lib/process-services-cloud/src/lib/styles/index';
@import '~@angular/material/theming';
@@ -27,6 +28,7 @@ $theme: mat-light-theme($primary, $accent, $warn);
@include adf-content-services-theme($theme);
@include adf-process-services-theme($theme);
@include adf-process-services-cloud-theme($theme);
@include adf-insights-theme($theme);
@include adf-core-theme($theme);

View File

@@ -6,6 +6,7 @@
@import '~@alfresco/adf-content-services/theming';
@import '~@alfresco/adf-process-services/theming';
@import '~@alfresco/adf-process-services-cloud/theming';
@import '~@alfresco/adf-insights/theming';
@import '~@alfresco/adf-core/theming';
@@ -26,6 +27,7 @@ $theme: mat-light-theme($primary, $accent, $warn);
@include adf-content-services-theme($theme);
@include adf-process-services-theme($theme);
@include adf-process-services-cloud-theme($theme);
@include adf-insights-theme($theme);
@include adf-core-theme($theme);

View File

@@ -28,6 +28,9 @@
],
"@alfresco/adf-insights": [
"../../lib/insights"
],
"@alfresco/adf-process-services-cloud": [
"../../lib/process-services-cloud"
]
}
},

View File

@@ -30,6 +30,12 @@
"@alfresco/adf-process-services": [
"../../lib/process-services"
],
"@alfresco/adf-process-services-cloud": [
"../../lib/process-services-cloud"
],
"@alfresco/adf-process-services-cloud/*": [
"../../lib/process-services-cloud/*"
],
"@alfresco/adf-insights": [
"../../lib/insights"
]

View File

@@ -38,6 +38,11 @@
"input": "../node_modules/@alfresco/adf-process-services/bundles/assets",
"output": "./assets/"
},
{
"glob": "**/*",
"input": "../node_modules/@alfresco/adf-process-services-cloud/bundles/assets",
"output": "./assets/"
},
{
"glob": "**/*",
"input": "../node_modules/@alfresco/adf-content-services/bundles/assets",

View File

@@ -17,12 +17,14 @@ module.exports = function(config) {
{ pattern: './node_modules/@angular/material/prebuilt-themes/indigo-pink.css', watched: false },
{ pattern: './node_modules/@alfresco/adf-core/bundles/assets/adf-core/i18n/en.json', watched: false, served: true, included: false },
{ pattern: './node_modules/@alfresco/adf-content-services/bundles/assets/adf-content-services/i18n/en.json', watched: false, served: true, included: false },
{ pattern: './node_modules/@alfresco/adf-process-services/bundles/assets/adf-process-services/i18n/en.json', watched: false, served: true, included: false }
{ pattern: './node_modules/@alfresco/adf-process-services/bundles/assets/adf-process-services/i18n/en.json', watched: false, served: true, included: false },
{ pattern: './node_modules/@alfresco/adf-process-services-cloud/bundles/assets/adf-process-services-cloud/i18n/en.json', watched: false, served: true, included: false }
],
proxies: {
'/assets/adf-core/i18n/en.json': '/base/node_modules/@alfresco/adf-core/bundles/assets/adf-core/i18n/en.json',
'/assets/adf-content-services/i18n/en.json': '/base/node_modules/@alfresco/adf-content-services/bundles/assets/adf-content-services/i18n/en.json',
'/assets/adf-process-services/i18n/en.json': '/base/node_modules/@alfresco/adf-process-services/bundles/assets/adf-process-services/i18n/en.json'
'/assets/adf-process-services/i18n/en.json': '/base/node_modules/@alfresco/adf-process-services/bundles/assets/adf-process-services/i18n/en.json',
'/assets/adf-process-services-cloud/i18n/en.json': '/base/node_modules/@alfresco/adf-process-services-cloud/bundles/assets/adf-process-services-cloud/i18n/en.json'
},
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser

6
lib/.gitignore vendored
View File

@@ -26,6 +26,11 @@ insights/**/*.js
insights/**/*.js.map
insights/**/*.d.ts
process-services-cloud/**/*.js
!process-services-cloud/karma.conf.js
process-services-cloud/**/*.js.map
process-services-cloud/**/*.d.ts
!config/karma-test-shim.js!
*.tgzf
@@ -39,3 +44,4 @@ process-services/_theming.scss
content-services/_theming.scss
core/_theming.scss
insights/_theming.scss
process-services-cloud/_theming.scss

View File

@@ -17,3 +17,7 @@ var mkdirpSync = require('fs-extra').mkdirpSync;
new Bundler().Bundle('./lib/content-services/styles/_index.scss', '**/*.scss').then(result => {
writeFileSync('./lib/dist/content-services/_theming.scss', result.bundledContent);
});
new Bundler().Bundle('./lib/process-services-cloud/src/lib/styles/_index.scss', '**/*.scss').then(result => {
writeFileSync('./lib/dist/process-services-cloud/_theming.scss', result.bundledContent);
});

View File

@@ -1,11 +1,13 @@
@import '../../../content-services/styles/index';
@import '../../../process-services/styles/index';
@import '../../../process-services-cloud/src/lib/styles/index';
@import '../../../core/styles/index';
@import '../../../insights/styles/index';
@mixin alfresco-material-theme($theme) {
@include adf-content-services-theme($theme);
@include adf-process-services-theme($theme);
@include adf-process-services-cloud-theme($theme);
@include adf-core-theme($theme);
@include adf-insights-theme($theme);
}

View File

@@ -0,0 +1,18 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './src/public_api';

View File

@@ -0,0 +1,31 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};

View File

@@ -0,0 +1,12 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../dist/process-services-cloud",
"lib": {
"languageLevel": ["dom", "es2017"],
"entryFile": "src/public_api.ts",
"flatModuleFile": "adf-process-services-cloud",
"umdModuleIds": {
"alfresco-js-api": "alfresco-js-api"
}
}
}

View File

@@ -0,0 +1,19 @@
{
"name": "@alfresco/adf-process-services-cloud",
"description": "Alfresco ADF process services cloud",
"version": "1.0.0",
"author": "Alfresco Software, Ltd.",
"main": "bundles/adf-process-services-cloud.js",
"repository": {
"type": "git",
"url": "https://github.com/Alfresco/alfresco-ng2-components.git"
},
"bugs": {
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
},
"peerDependencies": {
"@angular/common": "^6.0.0-rc.0 || ^6.0.0",
"@angular/core": "^6.0.0-rc.0 || ^6.0.0",
"alfresco-js-api": "2.6.0"
}
}

View File

@@ -0,0 +1,4 @@
<p>
hello cloud world!
</p>

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HelloComponent } from './hello.component';
describe('HelloComponent', () => {
let component: HelloComponent;
let fixture: ComponentFixture<HelloComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HelloComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HelloComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'adf-cloud-hello',
templateUrl: './hello.component.html',
styleUrls: ['./hello.component.css']
})
export class HelloComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -0,0 +1,13 @@
import { HelloModule } from './hello.module';
describe('HelloModule', () => {
let helloModule: HelloModule;
beforeEach(() => {
helloModule = new HelloModule();
});
it('should create an instance', () => {
expect(helloModule).toBeTruthy();
});
});

View File

@@ -0,0 +1,13 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HelloComponent } from './hello.component';
import { TranslateModule } from '@ngx-translate/core';
@NgModule({
imports: [
CommonModule,
TranslateModule
],
declarations: [HelloComponent],
exports: [HelloComponent]
})
export class HelloModule { }

View File

@@ -0,0 +1,3 @@
{
"TEST_KEY": "MY TEST"
}

View File

@@ -0,0 +1,21 @@
import { NgModule } from '@angular/core';
import { HelloModule } from './hello/hello.module';
import { TRANSLATION_PROVIDER } from '@alfresco/adf-core';
@NgModule({
imports: [
HelloModule
],
providers: [
{
provide: TRANSLATION_PROVIDER,
multi: true,
useValue: {
name: 'adf-process-services-cloud',
source: 'assets/adf-process-services-cloud'
}
}
],
declarations: [],
exports: [HelloModule]
})
export class ProcessServicesCloudModule { }

View File

@@ -0,0 +1,2 @@
@mixin adf-process-services-cloud-theme($theme) {
}

View File

@@ -0,0 +1,19 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './lib/process-services-cloud.module';
export * from './lib/hello/hello.module';

View File

@@ -0,0 +1,22 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@@ -0,0 +1,32 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": [
"dom",
"es2015"
]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -0,0 +1,17 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -0,0 +1,17 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"adf-cloud",
"camelCase"
],
"component-selector": [
true,
"element",
"adf-cloud",
"kebab-case"
]
}
}

View File

@@ -21,6 +21,7 @@
"types": ["jasmine"],
"allowSyntheticDefaultImports": true,
"paths": {
"@alfresco/adf-process-services-cloud": ["./process-services-cloud/"],
"@alfresco/adf-process-services": ["./process-services/"],
"@alfresco/adf-content-services": ["./content-services/"],
"@alfresco/adf-core": ["./core/"],

View File

@@ -12,7 +12,7 @@
"bundlesize-check": "bundlesize",
"lint-lib": "./node_modules/.bin/tslint -p ./lib/tsconfig.json -c ./lib/tslint.json",
"lint-e2e": "./node_modules/.bin/tslint -p ./e2e/tsconfig.e2e.json -c ./tslint.json",
"test-export": "ts-node ./tools/export-check/exportCheck.ts ./lib/core/public-api.ts ./lib/process-services/public-api.ts ./lib/content-services/public-api.ts ./lib/insights/public-api.ts",
"test-export": "ts-node ./tools/export-check/exportCheck.ts ./lib/core/public-api.ts ./lib/process-services/public-api.ts ./lib/content-services/public-api.ts ./lib/insights/public-api.ts ./lib/process-services-cloud/public-api.ts",
"ng": "ng",
"validate-config": "ajv validate -s ./lib/core/app-config/schema.json -d ./demo-shell/src/app.config.json --errors=text --verbose",
"start": "ng lint dist && npm run validate-config && npm run server-versions && ng serve dist --host 0.0.0.0 --proxy-config ./demo-shell/proxy.conf.js --open",
@@ -52,7 +52,8 @@
"alfresco",
"activiti",
"content services",
"process services"
"process services",
"process services-cloud"
],
"dependencies": {
"@alfresco/adf-content-services": "2.7.0-beta2",
@@ -191,6 +192,10 @@
{
"path": "./lib/dist/core/bundles/adf-core.umd.min.js",
"maxSize": "150 kb"
},
{
"path": "./lib/dist/process-services-cloud/bundles/adf-process-services-cloud.umd.min.js",
"maxSize": "50 kb"
}
],
"engines": {

View File

@@ -106,6 +106,9 @@ async function main() {
let insightUrl = await getUrl(program.folder, 'insights');
downloadZip(insightUrl, program.output, 'insights');
let processCloudUrl = await getUrl(program.folder, 'process-services-cloud');
downloadZip(processCloudUrl, program.output, 'process-services-cloud');
}
main();

View File

@@ -34,6 +34,11 @@ npm run ng-packagr -- -p ./lib/extensions/ && \
mkdir -p ./node_modules/@alfresco/adf-extensions/ && \
cp -R ./lib/dist/extensions/* ./node_modules/@alfresco/adf-extensions/
echo "------ Build process-services-cloud -----"
npm run ng-packagr -- -p ./lib/process-services-cloud/ && \
mkdir -p ./node_modules/@alfresco/adf-process-services-cloud/ && \
cp -R ./lib/dist/process-services-cloud/* ./node_modules/@alfresco/adf-process-services-cloud/
echo "====== Build style ====="
@@ -55,12 +60,16 @@ cp -R ./lib/process-services/i18n/* ./lib/dist/process-services/bundles/assets/a
mkdir -p ./lib/dist/insights/bundles/assets/adf-insights/i18n
cp -R ./lib/insights/i18n/* ./lib/dist/insights/bundles/assets/adf-insights/i18n
mkdir -p ./lib/dist/process-services-cloud/bundles/assets/adf-process-services-cloud/i18n
cp -R ./lib/process-services-cloud/src/lib/i18n/* ./lib/dist/process-services-cloud/bundles/assets/adf-process-services-cloud/i18n
echo "====== Copy assets ====="
cp -R ./lib/core/assets/* ./lib/dist/core/bundles/assets
cp -R ./lib/content-services/assets/* ./lib/dist/content-services/bundles/assets
cp -R ./lib/process-services/assets/* ./lib/dist/process-services/bundles/assets
cp -R ./lib/process-services-cloud/src/lib/assets/* ./lib/dist/process-services-cloud/bundles/assets
echo "====== Copy schema ====="

View File

@@ -19,6 +19,7 @@ eval projects=( "core"
"content-services"
"insights"
"process-services"
"process-services-cloud"
"extensions" )
show_help() {

View File

@@ -8,7 +8,8 @@ eval projects=( "adf-core"
"adf-insights"
"adf-content-services"
"adf-extensions"
"adf-process-services" )
"adf-process-services"
"adf-process-services-cloud" )
show_help() {
echo "Usage: npm-check-bundles.sh"

View File

@@ -6,6 +6,7 @@ eval projects=( "@alfresco/adf-core"
"@alfresco/adf-content-services"
"@alfresco/adf-insights"
"@alfresco/adf-process-services"
"@alfresco/adf-process-services-cloud"
"@alfresco/adf-extensions" )
show_help() {

View File

@@ -21,6 +21,7 @@ eval projects=(
"insights"
"content-services"
"process-services"
"process-services-cloud"
"extensions" )
cd "$DIR/../"

View File

@@ -20,6 +20,7 @@ eval GIT_ISH=""
eval projects=( "@alfresco/core"
"@alfresco/content-service"
"@alfresco/process-service"
"@alfresco/process-service-cloud"
"@alfresco/extensions" )
show_help() {

View File

@@ -42,12 +42,14 @@ rm -rf ../node_modules/@alfresco
mkdir -p $DIR/../node_modules/@alfresco/adf-core
mkdir -p $DIR/../node_modules/@alfresco/adf-content-services
mkdir -p $DIR/../node_modules/@alfresco/adf-process-services
mkdir -p $DIR/../node_modules/@alfresco/adf-process-services-cloud
mkdir -p $DIR/../node_modules/@alfresco/adf-insights
mkdir -p $DIR/../node_modules/@alfresco/adf-extensions
cp -R $DIR/../lib/dist/core/* $DIR/../node_modules/@alfresco/adf-core
cp -R $DIR/../lib/dist/content-services/* $DIR/../node_modules/@alfresco/adf-content-services
cp -R $DIR/../lib/dist/process-services/* $DIR/../node_modules/@alfresco/adf-process-services
cp -R $DIR/../lib/dist/process-services-cloud/* $DIR/../node_modules/@alfresco/adf-process-services-cloud
cp -R $DIR/../lib/dist/insights/* $DIR/../node_modules/@alfresco/adf-insights
cp -R $DIR/../lib/dist/extensions/* $DIR/../node_modules/@alfresco/adf-extensions

View File

@@ -10,6 +10,7 @@ eval TOTAL_BUILD=true;
eval projects=( "core"
"content-services"
"process-services"
"process-services-cloud"
"insights"
"extensions" )

View File

@@ -43,6 +43,7 @@ async function main() {
await this.writeZipLib('content-services', zipFolder);
await this.writeZipLib('process-services', zipFolder);
await this.writeZipLib('insights', zipFolder);
await this.writeZipLib('process-services-cloud', zipFolder);
let files = fs.readdirSync(path.join(__dirname, '../lib/dist/zip'));

View File

@@ -24,7 +24,7 @@ var configFileName = "doctool.config.json";
var defaultFolder = path.resolve("docs");
var sourceInfoFolder = path.resolve("docs", "sourceinfo");
var libFolders = ["core", "content-services", "process-services", "insights"];
var libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
var excludePatterns = [
"**/*.spec.ts"
@@ -41,7 +41,7 @@ function updatePhase(mdCache, aggData) {
});
var filenames = Object.keys(mdCache);
for (var i = 0; i < filenames.length; i++) {
var pathname = filenames[i];
@@ -164,8 +164,8 @@ function initSourceInfo(aggData, mdCache) {
let sources = app.expandInputFiles(libFolders.map(folder => {
return path.resolve("lib", folder);
}));
}));
aggData.projData = app.convert(sources);
@@ -188,7 +188,7 @@ function initSourceInfo(aggData, mdCache) {
}
/*
if (classRef) {
aggData.classInfo[className] = new si.ComponentInfo(classRef);
aggData.classInfo[className] = new si.ComponentInfo(classRef);
}
*/
@@ -204,7 +204,7 @@ function initClassInfo(aggData) {
yamlFilenames.forEach(yamlFilename => {
var classYamlText = fs.readFileSync(path.resolve(sourceInfoFolder, yamlFilename), "utf8");
var classYaml = jsyaml.safeLoad(classYamlText);
if (program.verbose) {
console.log(classYaml.items[0].name);
}
@@ -264,7 +264,7 @@ if (sourceInfo.isDirectory()) {
files = [ sourcePath ];
}
files = files.filter(filename =>
files = files.filter(filename =>
(filename !== undefined) &&
(path.extname(filename) === ".md") &&
(filename !== "README.md")
@@ -295,4 +295,4 @@ updatePhase(mdCache, aggData);
if (program.timing) {
var endTime = process.hrtime(startTime);
console.log(`Run complete in ${endTime[0]} sec`);
}
}

View File

@@ -20,7 +20,7 @@ var angFilePattern = /(component)|(directive)|(model)|(pipe)|(service)|(widget)/
var srcData = {};
var stoplist = new stoplist_1.Stoplist(stoplistFilePath);
var docsFolderPath = path.resolve("docs");
var libFolders = ["core", "content-services", "process-services", "insights"];
var libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
libsearch(srcData, path.resolve(libFolder));
/*
let keys = Object.keys(srcData);

View File

@@ -29,7 +29,7 @@ let stoplist = new Stoplist(stoplistFilePath);
let docsFolderPath = path.resolve("docs");
let libFolders = ["core", "content-services", "process-services", "insights"];
let libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
libsearch(srcData, path.resolve(libFolder));
@@ -148,7 +148,7 @@ function getDocFilePaths(folderPath) {
let libPath = path.resolve(folderPath, element);
let files = fs.readdirSync(libPath);
files = files.filter(filename =>
files = files.filter(filename =>
(path.extname(filename) === ".md") &&
(filename !== "README.md") &&
(filename.match(angFilePattern))
@@ -158,7 +158,7 @@ function getDocFilePaths(folderPath) {
result.push(path.join(libPath, element));
});
});
return result;
}
}

View File

@@ -27,7 +27,7 @@ var guideSummaryFileName = path.resolve(docsFolderPath, guideFolderName, "summar
var maxBriefDescLength = 180;
var adfLibNames = ["core", "content-services", "insights", "process-services"];
var adfLibNames = ["core", "content-services", "insights", "process-services", "process-services-cloud"];
var statusIcons;
@@ -41,7 +41,7 @@ function processDocs(mdCache, aggData, _errorMessages) {
function initPhase(aggData) {
statusIcons = aggData.config["statusIcons"] || {};
aggData.stoplist = makeStoplist(aggData.config);
aggData.stoplist = makeStoplist(aggData.config);
aggData.srcData = {};
aggData.mdFileDesc = [];
aggData.mdFileStatus = [];
@@ -298,7 +298,7 @@ function makeMDDocumentedTableRow(docItem, forSubFolder) {
var pathPrefix = "";
if (forSubFolder) {
pathPrefix = "../";
}
@@ -412,4 +412,4 @@ function removeBriefDescLinks(desc) {
link.item.value = link.item.children[0].value;
link.item.children = null;
});
}
}

View File

@@ -10,7 +10,7 @@ var ejs = require("ejs");
var typedoc_1 = require("typedoc");
var mdNav_1 = require("../mdNav");
var ngHelpers_1 = require("../ngHelpers");
var libFolders = ["core", "content-services", "process-services", "insights"];
var libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
var templateFolder = path.resolve("tools", "doc", "templates");
var excludePatterns = [
"**/*.spec.ts"
@@ -103,24 +103,24 @@ function angNameToClassName(rawName: string) {
return nameExceptions[rawName];
var name = rawName.replace(/\]|\(|\)/g, '');
var fileNameSections = name.split('.');
var compNameSections = fileNameSections[0].split('-');
var outCompName = '';
for (var i = 0; i < compNameSections.length; i++) {
outCompName = outCompName + initialCap(compNameSections[i]);
}
var itemTypeIndicator = '';
if (fileNameSections.length > 1) {
itemTypeIndicator = initialCap(fileNameSections[1]);
}
var finalName = outCompName + itemTypeIndicator;
return finalName;
}
*/

View File

@@ -20,7 +20,7 @@ import {
} from "../SourceInfoClasses"
let libFolders = ["core", "content-services", "process-services", "insights"];
let libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
let templateFolder = path.resolve("tools", "doc", "templates");
let excludePatterns = [
@@ -33,9 +33,9 @@ let nameExceptions;
export function processDocs(mdCache, aggData, _errorMessages) {
//initPhase(aggData);
nameExceptions = aggData.config.typeNameExceptions;
let pathnames = Object.keys(mdCache);
let internalErrors;
@@ -74,8 +74,8 @@ function initPhase(aggData) {
let sources = app.expandInputFiles(libFolders.map(folder => {
return path.resolve("lib", folder);
}));
}));
aggData.projData = app.convert(sources);
}
@@ -106,7 +106,7 @@ function updateFile(tree, pathname, aggData, errorMessages) {
let inputMD = getPropDocsFromMD(tree, "Properties", 3);
let outputMD = getPropDocsFromMD(tree, "Events", 2);
updatePropDocsFromMD(compData, inputMD, outputMD, errorMessages);
if (classType === "service") {
let methodMD = getMethodDocsFromMD(tree);
updateMethodDocsFromMD(compData, methodMD, errorMessages);
@@ -146,24 +146,24 @@ function angNameToClassName(rawName: string) {
return nameExceptions[rawName];
var name = rawName.replace(/\]|\(|\)/g, '');
var fileNameSections = name.split('.');
var compNameSections = fileNameSections[0].split('-');
var outCompName = '';
for (var i = 0; i < compNameSections.length; i++) {
outCompName = outCompName + initialCap(compNameSections[i]);
}
var itemTypeIndicator = '';
if (fileNameSections.length > 1) {
itemTypeIndicator = initialCap(fileNameSections[1]);
}
var finalName = outCompName + itemTypeIndicator;
return finalName;
}
*/
@@ -205,7 +205,7 @@ function getPropDocsFromMD(tree, sectionHeading, docsColumn) {
propTableRow = propsTable.childNav
.tableRow(()=>true, i).childNav;
}
return result;
}
@@ -331,7 +331,7 @@ function updateMethodDocsFromMD(comp: ComponentInfo, methodDocs, errorMessages)
meth.docText = currMethMD.docText;
errorMessages.push(`Warning: empty JSDocs for method sig "${meth.name}" may need sync with the .md file.`);
}
meth.params.forEach(param => {
if (!param.docText && currMethMD && currMethMD.params[param.name])
{
@@ -340,4 +340,4 @@ function updateMethodDocsFromMD(comp: ComponentInfo, methodDocs, errorMessages)
}
});
});
}
}

View File

@@ -25,7 +25,7 @@ var includedNodeTypes = [
"link", "text"
];
var docFolder = path.resolve("docs");
var adfLibNames = ["core", "content-services", "insights", "process-services"];
var adfLibNames = ["core", "content-services", "insights", "process-services", "process-services-cloud"];
var externalNameLinks;
function processDocs(mdCache, aggData, errorMessages) {
initPhase(aggData);
@@ -88,7 +88,7 @@ function updateFile(tree, pathname, aggData, _errorMessages) {
if (link) {
convertNodeToTypeLink(node, node.value, link);
}
} else */
if (node.type === "link") {
if (node.children && ((node.children[0].type === "inlineCode") ||

View File

@@ -35,7 +35,7 @@ const includedNodeTypes = [
];
const docFolder = path.resolve("docs");
const adfLibNames = ["core", "content-services", "insights", "process-services"];
const adfLibNames = ["core", "content-services", "insights", "process-services", "process-services-cloud"];
let externalNameLinks;
@@ -109,7 +109,7 @@ function updateFile(tree, pathname, aggData, _errorMessages) {
if (!includedNodeTypes.includes(node.type)) {
return;
}
/*if (node.type === "inlineCode") {
console.log(`Link text: ${node.value}`);
let link = resolveTypeLink(aggData, node.value);
@@ -117,7 +117,7 @@ function updateFile(tree, pathname, aggData, _errorMessages) {
if (link) {
convertNodeToTypeLink(node, node.value, link);
}
} else */
if (node.type === "link") {
if (node.children && (
@@ -267,7 +267,7 @@ class WordScanner {
this.nextSeparator = 0;
this.next();
}
finished() {
return this.index >= this.text.length;
}
@@ -353,7 +353,7 @@ function handleLinksInBodyText(aggData, text: string, wrapInlineCode: boolean =
matcher.reset();
}
}
let remainingText = text.substring(currTextStart, text.length);
if (remainingText) {

File diff suppressed because it is too large Load Diff