.editorconfig000066400000000000000000000004221516107111100135230ustar00rootroot00000000000000# Editor configuration, see https://editorconfig.org root = true [*] charset = utf-8 indent_style = space indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true [*.ts] quote_type = single [*.md] max_line_length = off trim_trailing_whitespace = false .gitignore000066400000000000000000000015371516107111100130460ustar00rootroot00000000000000/build /node_modules /*.log /*.iws .idea/workspace.xml .idea/tasks.xml .idea/profiles_settings.xml .idea/inspectionProfiles/Project_Default.xml .idea/inspectionProfiles/profiles_settings.xml node_modules/.yarn-integrity # See http://help.github.com/ignore-files/ for more about ignoring files. # compiled output /dist /release /tmp /out-tsc # Only exists if Bazel was run /bazel-out # dependencies /node_modules # profiling files chrome-profiler-events*.json speed-measure-plugin*.json # IDEs and editors /.idea .project .classpath .c9/ *.launch .settings/ *.sublime-workspace # IDE - VSCode .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json .history/* # misc /.sass-cache /connect.lock /coverage /libpeerconnection.log npm-debug.log yarn-error.log testem.log /typings # System Files .DS_Store Thumbs.db .npmignore000066400000000000000000000002501516107111100130440ustar00rootroot00000000000000/.idea /artifacts /build /Gemfile /_layouts /_site /_includes /test /node_modules /*.iml /*.ipr /*.iws /.travis.yml /.scrutinizer.yml /Gruntfile.js /corifeus-boot.json .travis.yml000066400000000000000000000014551516107111100131660ustar00rootroot00000000000000language: node_js cache: npm: false node_js: - lts/* before_script: - npm install -g grunt-cli npm env: global: secure: hv/FQcpG82bcau68yDbZYMY3ifdtqP2Rx5ZWibvjAYysR1YQe4m7hKs6IDxx9YvFHGMQc5V8JnLEVAkjg6FynL+cTpM5UM4983vv7eneTRIb3XK39dbcvZgZhH/T9dfY+Hodkij3GcLGcUyxm0LS2vOM9JozDGroHhN4VjAUib3rkLLaX88zBSdCPWLFQV3wJU3Wk9u5ddosC4iV5I56Jk7+X0to+aflS0oS3xiOybYdzVKYwWHxGOBpJhQs43vMOwbxY+5ao/EcTMGy/fb/VJNaH2KSkr/v0kB3SsmW2q/W7CFIp6F5AZt5me2bLZlFwo17z9RS6oB5jR9PbdOysOo+V+8RStqRTwUlBhiDPIffpZdQZajwHVea/1R2k3fW+JOgPmsqfb39/OGM9bEI7A4iv6WwGxShEF1ZJCwJSEWNMemSKfWBAul1M9SIUzUhrUo7r0DwJR/P5/jrqR82or1LnheS2RSlQRNOME1dItisjStPuH0ojPSztcrnmElE1fAGOZBCKRDJuWdbd1aAPaKIbSL4cR0UP2eJzTCy2Y0L/uYu/BQgwTDbJA+7cCrxKbYv46r2gZR3Hljw5WnCMnaxUHUutEDLR0O1rn+nU5oJxiVjr5fQvJfTqnR0be43TtcOL5Q+ELOIhMceuJ0aYc3MRVCohcDJL/m+dNyQ0C8= Gruntfile.js000066400000000000000000000024021516107111100133430ustar00rootroot00000000000000const utils = require('corifeus-utils'); const path = require('path') const fs = require('fs').promises module.exports = (grunt) => { const builder = require(`corifeus-builder`); const loader = new builder.loader(grunt); loader.js({ replacer: { type: 'p3x', npmio: true, }, }); grunt.registerTask('publish', async function () { const done = this.async(); try { await builder.utils.spawn({ grunt: grunt, gruntThis: this, }, { cmd: 'npm', args: [ 'run', 'build-lib', ] }); done() } catch (e) { done(e) } }); grunt.registerTask('hook-lib', async function () { const done = this.async(); try { const rootPkgName = require('./package.json') const pkgName = path.resolve(`./projects/angular-http-cache-interceptor/package.json`) let pkg = require(pkgName) pkg.name = rootPkgName.name pkg.corifeus = { install: false } const data = JSON.stringify(pkg, null, 4) await fs.writeFile(pkgName, data) done() } catch (e) { done(e) } }); const defaultTask = builder.config.task.build.js.concat(['hook-lib']) grunt.registerTask('default', defaultTask ); } LICENSE000066400000000000000000000026411516107111100120600ustar00rootroot00000000000000 @license p3x-angular-http-cache-interceptor v2020.4.262 🔥 Cache every request in Angular, not only the GET, but all methods using as an interceptor, and allows you to interact with the interceptor via specific headers, that are will be not included in the request. https://pages.corifeus.com/angular-http-cache-interceptor Copyright (c) 2020 Patrik Laszlo / P3X / Corifeus and contributors. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. README.md000066400000000000000000000071151516107111100123330ustar00rootroot00000000000000[//]: #@corifeus-header [![NPM](https://nodei.co/npm/p3x-angular-http-cache-interceptor.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/p3x-angular-http-cache-interceptor/) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://paypal.me/patrikx3) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Corifeus @ Facebook](https://img.shields.io/badge/Facebook-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Build Status](https://api.travis-ci.com/patrikx3/angular-http-cache-interceptor.svg?branch=master)](https://travis-ci.com/patrikx3/angular-http-cache-interceptor) [![Uptime Robot ratio (30 days)](https://img.shields.io/uptimerobot/ratio/m780749701-41bcade28c1ea8154eda7cca.svg)](https://uptimerobot.patrikx3.com/) # 🔥 Cache every request in Angular, not only the GET, but all methods using as an interceptor, and allows you to interact with the interceptor via specific headers, that are will be not included in the request. v2020.4.263 **Bugs are evident™ - MATRIX️** ### NodeJs LTS Version Requirement ``` >=12.13.0 ``` ### Built on NodeJs ``` v12.16.3 ``` The ```async``` and ```await``` keywords are required. Only LTS variants are supported. Install NodeJs: https://nodejs.org/en/download/package-manager/ # Built on Angular ```text 9.1.4 ``` # Description [//]: #@corifeus-header:end Based on [@d4h/angular-http-cache](https://www.npmjs.com/package/@d4h/angular-http-cache), but it works without any configuration. Usually, you do not cache all requests, but only the `GET` method. For some clients, it is required to cache everything, including other methods as well. There is a room in the future, to restrict to specific methods and more configurations, if there is a request for this micro-service. # Example web page https://angular-http-cache-interceptor.corifeus.com # How to use it ```bash npm i p3x-angular-http-cache-interceptor ``` In development ... [//]: #@corifeus-footer --- 🙏 This is an open-source project. Star this repository, if you like it, or even donate to maintain the servers and the development. Thank you so much! Possible, this server, rarely, is down, please, hang on for 15-30 minutes and the server will be back up. All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://corifeus.com)) could have minor errors, since I am developing in my free time. However, it is usually stable. **Note about versioning:** Versions are cut in Major.Minor.Patch schema. Major is always the current year. Minor is either 4 (January - June) or 10 (July - December). Patch is incremental by every build. If there is a breaking change, it should be noted in the readme. --- [**P3X-ANGULAR-HTTP-CACHE-INTERCEPTOR**](https://pages.corifeus.com/angular-http-cache-interceptor) Build v2020.4.263 [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) ## P3X Sponsor [IntelliJ - The most intelligent Java IDE](https://www.jetbrains.com/?from=patrikx3) [![JetBrains](https://cdn.corifeus.com/assets/svg/jetbrains-logo.svg)](https://www.jetbrains.com/?from=patrikx3) [//]: #@corifeus-footer:end README_Angular.md000066400000000000000000000054701516107111100140060ustar00rootroot00000000000000[//]: #@corifeus-header # 🔥 Cache every request in Angular, not only the GET, but all methods using as an interceptor, and allows you to interact with the interceptor via specific headers, that are will be not included in the request. [//]: #@corifeus-header:end # Workspace This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1. ## Development server Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. ## Code scaffolding Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. ## Build Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. ## Running unit tests Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). ## Running end-to-end tests Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). ## Further help To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). [//]: #@corifeus-footer --- 🙏 This is an open-source project. Star this repository, if you like it, or even donate to maintain the servers and the development. Thank you so much! Possible, this server, rarely, is down, please, hang on for 15-30 minutes and the server will be back up. All my domains ([patrikx3.com](https://patrikx3.com) and [corifeus.com](https://corifeus.com)) could have minor errors, since I am developing in my free time. However, it is usually stable. **Note about versioning:** Versions are cut in Major.Minor.Patch schema. Major is always the current year. Minor is either 4 (January - June) or 10 (July - December). Patch is incremental by every build. If there is a breaking change, it should be noted in the readme. --- [**P3X-ANGULAR-HTTP-CACHE-INTERCEPTOR**](https://pages.corifeus.com/angular-http-cache-interceptor) Build v2020.4.263 [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) ## P3X Sponsor [IntelliJ - The most intelligent Java IDE](https://www.jetbrains.com/?from=patrikx3) [![JetBrains](https://cdn.corifeus.com/assets/svg/jetbrains-logo.svg)](https://www.jetbrains.com/?from=patrikx3) [//]: #@corifeus-footer:endangular-http-cache-interceptor.iml000066400000000000000000000005171516107111100175610ustar00rootroot00000000000000 angular.json000066400000000000000000000120531516107111100133750ustar00rootroot00000000000000{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "workspace": { "projectType": "application", "schematics": { "@schematics/angular:component": { "style": "scss" } }, "root": "", "sourceRoot": "src", "prefix": "p3x", "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "release/workspace", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "aot": true, "assets": [ "src/favicon.ico", "src/assets" ], "styles": [ "src/styles.scss" ], "scripts": [] }, "configurations": { "production": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } ], "optimization": true, "outputHashing": "all", "sourceMap": false, "extractCss": true, "namedChunks": false, "extractLicenses": true, "vendorChunk": false, "buildOptimizer": true, "budgets": [ { "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb" }, { "type": "anyComponentStyle", "maximumWarning": "6kb", "maximumError": "10kb" } ] } } }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "workspace:build" }, "configurations": { "production": { "browserTarget": "workspace:build:production" } } }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { "browserTarget": "workspace:build" } }, "test": { "builder": "@angular-devkit/build-angular:karma", "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", "assets": [ "src/favicon.ico", "src/assets" ], "styles": [ "src/styles.scss" ], "scripts": [] } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ "tsconfig.app.json", "tsconfig.spec.json", "e2e/tsconfig.json" ], "exclude": [ "**/node_modules/**" ] } }, "e2e": { "builder": "@angular-devkit/build-angular:protractor", "options": { "protractorConfig": "e2e/protractor.conf.js", "devServerTarget": "workspace:serve" }, "configurations": { "production": { "devServerTarget": "workspace:serve:production" } } } } }, "angular-http-cache-interceptor": { "projectType": "library", "root": "projects/angular-http-cache-interceptor", "sourceRoot": "projects/angular-http-cache-interceptor/src", "prefix": "p3x", "architect": { "build": { "builder": "@angular-devkit/build-ng-packagr:build", "options": { "tsConfig": "projects/angular-http-cache-interceptor/tsconfig.lib.json", "project": "projects/angular-http-cache-interceptor/ng-package.json" }, "configurations": { "production": { "tsConfig": "projects/angular-http-cache-interceptor/tsconfig.lib.prod.json" } } }, "test": { "builder": "@angular-devkit/build-angular:karma", "options": { "main": "projects/angular-http-cache-interceptor/src/test.ts", "tsConfig": "projects/angular-http-cache-interceptor/tsconfig.spec.json", "karmaConfig": "projects/angular-http-cache-interceptor/karma.conf.js" } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ "projects/angular-http-cache-interceptor/tsconfig.lib.json", "projects/angular-http-cache-interceptor/tsconfig.spec.json" ], "exclude": [ "**/node_modules/**" ] } } } }}, "defaultProject": "workspace" } browserslist000066400000000000000000000006551516107111100135430ustar00rootroot00000000000000# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. # For additional information regarding the format and rule options, please see: # https://github.com/browserslist/browserslist#queries # You can see what browsers were selected by your queries by running: # npx browserslist > 0.5% last 2 versions Firefox ESR not dead not IE 9-11 # For IE 9-11 support, remove 'not'.e2e/000077500000000000000000000000001516107111100115235ustar00rootroot00000000000000e2e/protractor.conf.js000066400000000000000000000014501516107111100152040ustar00rootroot00000000000000// @ts-check // Protractor configuration file, see link for more information // https://github.com/angular/protractor/blob/master/lib/config.ts const { SpecReporter } = require('jasmine-spec-reporter'); /** * @type { import("protractor").Config } */ exports.config = { allScriptsTimeout: 11000, specs: [ './src/**/*.e2e-spec.ts' ], capabilities: { browserName: 'chrome' }, directConnect: true, baseUrl: 'http://localhost:4200/', framework: 'jasmine', jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, print: function() {} }, onPrepare() { require('ts-node').register({ project: require('path').join(__dirname, './tsconfig.json') }); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); } };e2e/src/000077500000000000000000000000001516107111100123125ustar00rootroot00000000000000e2e/src/app.e2e-spec.ts000066400000000000000000000012021516107111100150370ustar00rootroot00000000000000import { AppPage } from './app.po'; import { browser, logging } from 'protractor'; describe('workspace-project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); expect(page.getTitleText()).toEqual('workspace app is running!'); }); afterEach(async () => { // Assert that there are no errors emitted from the browser const logs = await browser.manage().logs().get(logging.Type.BROWSER); expect(logs).not.toContain(jasmine.objectContaining({ level: logging.Level.SEVERE, } as logging.Entry)); }); }); e2e/src/app.po.ts000066400000000000000000000004551516107111100140630ustar00rootroot00000000000000import { browser, by, element } from 'protractor'; export class AppPage { navigateTo(): Promise { return browser.get(browser.baseUrl) as Promise; } getTitleText(): Promise { return element(by.css('p3x-root .content span')).getText() as Promise; } } e2e/tsconfig.json000066400000000000000000000003261516107111100142330ustar00rootroot00000000000000{ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/e2e", "module": "commonjs", "target": "es5", "types": [ "jasmine", "jasminewd2", "node" ] } } karma.conf.js000066400000000000000000000017751516107111100134370ustar00rootroot00000000000000// 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/workspace'), reports: ['html', 'lcovonly', 'text-summary'], fixWebpackSourcePaths: true }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], singleRun: false, restartOnFileChange: true }); }; package.json000066400000000000000000000065161516107111100133460ustar00rootroot00000000000000{ "name": "p3x-angular-http-cache-interceptor", "version": "2020.4.263", "corifeus": { "icon": "fas fa-fire", "prefix": "p3x-", "publish": true, "type": "p3x", "code": "Breeze", "nodejs": "v12.16.3", "opencollective": false, "reponame": "angular-http-cache-interceptor", "build": true, "cdn": true, "publish-location": "./release/angular-http-cache-interceptor" }, "description": "🔥 Cache every request in Angular, not only the GET, but all methods using as an interceptor, and allows you to interact with the interceptor via specific headers, that are will be not included in the request.", "scripts": { "test": "grunt", "ng": "ng", "start": "ng serve", "build": "ng build", "test2": "ng test", "lint": "ng lint", "e2e": "ng e2e", "build-lib": "ng build --prod --project angular-http-cache-interceptor && cp README.md ./release/angular-http-cache-interceptor && cp LICENSE ./release/angular-http-cache-interceptor && ./scripts/post-lib-build.js", "build-app": "ng build --prod --source-map=false --extract-css=true --output-hashing=all --configuration=production --deploy-url=/ --base-href=/ --aot=true --build-optimizer=true --optimization=true" }, "repository": { "type": "git", "url": "git+https://github.com/patrikx3/angular-http-cache-interceptor.git" }, "keywords": [ "angular", "cache", "interceptor", "network", "http", "client", "http-client", "header", "headers", "interact" ], "author": "Patrik Laszlo ", "license": "MIT", "bugs": { "url": "https://github.com/patrikx3/angular-http-cache-interceptor/issues" }, "homepage": "https://pages.corifeus.com/angular-http-cache-interceptor", "dependencies": { "@angular/animations": "~9.1.4", "@angular/common": "~9.1.4", "@angular/compiler": "~9.1.4", "@angular/core": "~9.1.4", "@angular/forms": "~9.1.4", "@angular/platform-browser": "~9.1.4", "@angular/platform-browser-dynamic": "~9.1.4", "@angular/router": "~9.1.4", "p3x-interceptor": "npm:p3x-angular-http-cache-interceptor@^2020.4.260", "rxjs": "~6.5.5", "tslib": "^1.11.1", "zone.js": "~0.10.3" }, "devDependencies": { "corifeus-builder": "^2020.4.176", "@angular-devkit/build-angular": "~0.901.4", "@angular-devkit/build-ng-packagr": "~0.901.4", "@angular/cli": "~9.1.4", "@angular/compiler-cli": "~9.1.4", "@angular/language-service": "~9.1.4", "@types/node": "^13.13.4", "@types/jasmine": "~3.5.10", "@types/jasminewd2": "~2.0.8", "codelyzer": "^5.2.2", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~5.0.2", "karma": "~5.0.3", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~2.1.1", "karma-jasmine": "~3.1.1", "karma-jasmine-html-reporter": "^1.5.3", "ng-packagr": "^9.1.2", "protractor": "~5.4.4", "ts-node": "~8.9.1", "tslint": "~6.1.2", "typescript": "~3.8.3" }, "engines": { "node": ">=12.13.0" } } projects/000077500000000000000000000000001516107111100127015ustar00rootroot00000000000000projects/angular-http-cache-interceptor/000077500000000000000000000000001516107111100207045ustar00rootroot00000000000000projects/angular-http-cache-interceptor/.gitignore000066400000000000000000000015371516107111100227020ustar00rootroot00000000000000/build /node_modules /*.log /*.iws .idea/workspace.xml .idea/tasks.xml .idea/profiles_settings.xml .idea/inspectionProfiles/Project_Default.xml .idea/inspectionProfiles/profiles_settings.xml node_modules/.yarn-integrity # See http://help.github.com/ignore-files/ for more about ignoring files. # compiled output /dist /release /tmp /out-tsc # Only exists if Bazel was run /bazel-out # dependencies /node_modules # profiling files chrome-profiler-events*.json speed-measure-plugin*.json # IDEs and editors /.idea .project .classpath .c9/ *.launch .settings/ *.sublime-workspace # IDE - VSCode .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json .history/* # misc /.sass-cache /connect.lock /coverage /libpeerconnection.log npm-debug.log yarn-error.log testem.log /typings # System Files .DS_Store Thumbs.db projects/angular-http-cache-interceptor/README.md000066400000000000000000000022301516107111100221600ustar00rootroot00000000000000# AngularHttpCacheInterceptor This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.3. ## Code scaffolding Run `ng generate component component-name --project angular-http-cache-interceptor` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project angular-http-cache-interceptor`. > Note: Don't forget to add `--project angular-http-cache-interceptor` or else it will be added to the default project in your `angular.json` file. ## Build Run `ng build angular-http-cache-interceptor` to build the project. The build artifacts will be stored in the `dist/` directory. ## Publishing After building your library with `ng build angular-http-cache-interceptor`, go to the dist folder `cd dist/angular-http-cache-interceptor` and run `npm publish`. ## Running unit tests Run `ng test angular-http-cache-interceptor` to execute the unit tests via [Karma](https://karma-runner.github.io). ## Further help To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). projects/angular-http-cache-interceptor/karma.conf.js000066400000000000000000000020261516107111100232610ustar00rootroot00000000000000// 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/angular-http-cache-interceptor'), reports: ['html', 'lcovonly', 'text-summary'], fixWebpackSourcePaths: true }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], singleRun: false, restartOnFileChange: true }); }; projects/angular-http-cache-interceptor/ng-package.json000066400000000000000000000002671516107111100236010ustar00rootroot00000000000000{ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../release/angular-http-cache-interceptor", "lib": { "entryFile": "src/public-api.ts" } } projects/angular-http-cache-interceptor/package.json000066400000000000000000000004641516107111100231760ustar00rootroot00000000000000{ "name": "p3x-angular-http-cache-interceptor", "peerDependencies": { "@angular/common": "^9.1.4", "@angular/core": "^9.1.4", "tslib": "^1.11.1" }, "corifeus": { "install": false }, "devDependencies": { "corifeus-builder": "^2020.4.169" } }projects/angular-http-cache-interceptor/src/000077500000000000000000000000001516107111100214735ustar00rootroot00000000000000projects/angular-http-cache-interceptor/src/lib/000077500000000000000000000000001516107111100222415ustar00rootroot00000000000000projects/angular-http-cache-interceptor/src/lib/http-cache-interceptor.interceptor.ts000066400000000000000000000006511516107111100315240ustar00rootroot00000000000000import { Injectable } from '@angular/core'; import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http'; import { Observable } from 'rxjs'; @Injectable() export class HttpCacheInterceptorInterceptor implements HttpInterceptor { constructor() {} intercept(request: HttpRequest, next: HttpHandler): Observable> { return next.handle(request); } } projects/angular-http-cache-interceptor/src/lib/http-cache-interceptor.module.ts000066400000000000000000000006611516107111100304540ustar00rootroot00000000000000import { NgModule } from '@angular/core'; import {HTTP_INTERCEPTORS} from "@angular/common/http"; import { HttpCacheInterceptorInterceptor } from './http-cache-interceptor.interceptor' @NgModule({ declarations: [], imports: [ ], providers: [ { provide: HTTP_INTERCEPTORS, useClass: HttpCacheInterceptorInterceptor, multi: true } ], exports: [] }) export class P3XHttpCacheInterceptorModule { } projects/angular-http-cache-interceptor/src/public-api.ts000066400000000000000000000001651516107111100240720ustar00rootroot00000000000000/* * Public API Surface of angular-http-cache-interceptor */ export * from './lib/http-cache-interceptor.module'; projects/angular-http-cache-interceptor/src/test.ts000066400000000000000000000014151516107111100230230ustar00rootroot00000000000000// This file is required by karma.conf.js and loads recursively all the .spec and framework files 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: { context(path: string, deep?: boolean, filter?: RegExp): { keys(): string[]; (id: string): T; }; }; // 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); projects/angular-http-cache-interceptor/tsconfig.lib.json000066400000000000000000000006631516107111100241650ustar00rootroot00000000000000{ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/lib", "target": "es2015", "declaration": true, "inlineSources": true, "types": [], "lib": [ "dom", "es2018" ] }, "angularCompilerOptions": { "skipTemplateCodegen": true, "strictMetadataEmit": true, "enableResourceInlining": true }, "exclude": [ "src/test.ts", "**/*.spec.ts" ] } projects/angular-http-cache-interceptor/tsconfig.lib.prod.json000066400000000000000000000001411516107111100251170ustar00rootroot00000000000000{ "extends": "./tsconfig.lib.json", "angularCompilerOptions": { "enableIvy": false } } projects/angular-http-cache-interceptor/tsconfig.spec.json000066400000000000000000000003661516107111100243510ustar00rootroot00000000000000{ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/spec", "types": [ "jasmine", "node" ] }, "files": [ "src/test.ts" ], "include": [ "**/*.spec.ts", "**/*.d.ts" ] } projects/angular-http-cache-interceptor/tslint.json000066400000000000000000000003671516107111100231220ustar00rootroot00000000000000{ "extends": "../../tslint.json", "rules": { "directive-selector": [ true, "attribute", "p3x", "camelCase" ], "component-selector": [ true, "element", "p3x", "kebab-case" ] } } scripts/000077500000000000000000000000001516107111100125375ustar00rootroot00000000000000scripts/post-lib-build.js000077500000000000000000000013731516107111100157320ustar00rootroot00000000000000#!/usr/bin/env node const fs = require('fs').promises const execAsync = async () => { const rootPkgName = require('../package.json') const pkgName = __dirname + '/../release/angular-http-cache-interceptor/package.json' let pkg = require(pkgName) pkg.devDependencies = pkg.devDependencies || {} pkg.name = rootPkgName.name pkg.devDependencies['corifeus-builder'] = rootPkgName.devDependencies['corifeus-builder'] pkg.corifeus = { publish: true } delete rootPkgName.devDependencies delete rootPkgName.dependencies delete rootPkgName.corifeus delete rootPkgName.scripts delete rootPkgName.private pkg = Object.assign(pkg, rootPkgName) const data = JSON.stringify(pkg, null, 4) await fs.writeFile(pkgName, data) } execAsync() src/000077500000000000000000000000001516107111100116375ustar00rootroot00000000000000src/app/000077500000000000000000000000001516107111100124175ustar00rootroot00000000000000src/app/app.component.html000066400000000000000000000000051516107111100160610ustar00rootroot00000000000000test src/app/app.component.scss000066400000000000000000000000001516107111100160630ustar00rootroot00000000000000src/app/app.component.spec.ts000066400000000000000000000016671516107111100165130ustar00rootroot00000000000000import { TestBed, async } from '@angular/core/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ AppComponent ], }).compileComponents(); })); it('should create the app', () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app).toBeTruthy(); }); it(`should have as title 'workspace'`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app.title).toEqual('workspace'); }); it('should render title', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.nativeElement; expect(compiled.querySelector('.content span').textContent).toContain('workspace app is running!'); }); }); src/app/app.component.ts000066400000000000000000000003001516107111100155410ustar00rootroot00000000000000import { Component } from '@angular/core'; @Component({ selector: 'p3x-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent { } src/app/app.module.ts000066400000000000000000000010521516107111100150310ustar00rootroot00000000000000import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; //import { P3XHttpCacheInterceptorModule } from '../../projects/angular-http-cache-interceptor/src/lib/http-cache-interceptor.module' import { P3XHttpCacheInterceptorModule } from 'p3x-interceptor' @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, P3XHttpCacheInterceptorModule, ], providers: [ ], bootstrap: [AppComponent] }) export class AppModule { } src/assets/000077500000000000000000000000001516107111100131415ustar00rootroot00000000000000src/assets/.gitkeep000066400000000000000000000000001516107111100145600ustar00rootroot00000000000000src/environments/000077500000000000000000000000001516107111100143665ustar00rootroot00000000000000src/environments/environment.prod.ts000066400000000000000000000000631516107111100202440ustar00rootroot00000000000000export const environment = { production: true }; src/environments/environment.ts000066400000000000000000000012231516107111100173000ustar00rootroot00000000000000// This file can be replaced during build by using the `fileReplacements` array. // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. export const environment = { production: false }; /* * For easier debugging in development mode, you can import the following file * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. * * This import should be commented out in production mode because it will have a negative impact * on performance if an error is thrown. */ import 'zone.js/dist/zone-error'; // Included with Angular CLI. src/favicon.ico000066400000000000000000000764461516107111100140010ustar00rootroot00000000000000 hF 00 %V@@ (B:(  @]KI]KI;]KI\JI]KI]KIc]KI]KI]KIq]KI]KI]KI\JH]KI]KI]KI]KI7]KI]KI]KI-]KI]KI]KHM]KI]KI]KI]KI]KI]KIC]KI]KI]KI]KIi]KI]KI]KI]KI]KI]KI]KI]KI\KI]KI]KI]KH]KI]KI]KI]KI9]KI]KI]KI\KH\KHw\KI]KI]KI]KI\KI1]JI]KI]KI]KI]KH]KI]KI]KI \KI]KI]KI]KI5]KI'\KI]KI%]KI \KI]KI]KI+\KI]KI( @ ]KIC]KH]KI-]KI]KH]KI]KI]KI]KIQ]KI_]KI]KH]KI \JI]KI]KI]KI]JI]KI]KI]KI;]KI]KI]KI7]KI]KI]KI]KI]KI]KI]KI]KI ]KI ]KI]KI]KI]KI]KI{]KI]KH]KIc]KIc]KI]KI]KI]KI)]KI%]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]JI\JI]KI]KI]KI]KI]KI]KIk]KIM]KI]KI]KI]KI]KI]KI]KI9]KI7]KI]KI]KI]KI]KI]KI ]KI]KI]KI]KI]KI]KI]KI]KI]KH ]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI]KI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I ]KH ]KIo]KI]KI]KI]KI]KI\KH]KI\KIk]KI]KI]KI]KIG]KI ]KIc\KI]KI\JI src/index.html000066400000000000000000000005001516107111100136270ustar00rootroot00000000000000 P3X Angular HTTP Cache Interceptor src/main.ts000066400000000000000000000005641516107111100131400ustar00rootroot00000000000000import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module'; import { environment } from './environments/environment'; if (environment.production) { enableProdMode(); } platformBrowserDynamic().bootstrapModule(AppModule) .catch(err => console.error(err)); src/polyfills.ts000066400000000000000000000054231516107111100142300ustar00rootroot00000000000000/** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. * * This file is divided into 2 sections: * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. * 2. Application imports. Files imported after ZoneJS that should be loaded before your main * file. * * The current setup is for so-called "evergreen" browsers; the last versions of browsers that * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. * * Learn more in https://angular.io/guide/browser-support */ /*************************************************************************************************** * BROWSER POLYFILLS */ /** IE10 and IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. /** * Web Animations `@angular/platform-browser/animations` * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). */ // import 'web-animations-js'; // Run `npm install --save web-animations-js`. /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags * because those flags need to be set before `zone.js` being loaded, and webpack * will put import in the top of bundle, so user need to create a separate file * in this directory (for example: zone-flags.ts), and put the following flags * into that file, and then add the following code before importing zone.js. * import './zone-flags'; * * The flags allowed in zone-flags.ts are listed here. * * The following flags will work for all browsers. * * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames * * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js * with the following flag, it will bypass `zone.js` patch for IE/Edge * * (window as any).__Zone_enable_cross_context_check = true; * */ /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ import 'zone.js/dist/zone'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS */ src/styles.scss000066400000000000000000000001201516107111100140500ustar00rootroot00000000000000/* You can add global styles to this file, and also import other style files */ src/test.ts000066400000000000000000000013611516107111100131670ustar00rootroot00000000000000// This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/dist/zone-testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; declare const require: { context(path: string, deep?: boolean, filter?: RegExp): { keys(): string[]; (id: string): T; }; }; // 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); tsconfig.app.json000066400000000000000000000003221516107111100143330ustar00rootroot00000000000000{ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/app", "types": [] }, "files": [ "src/main.ts", "src/polyfills.ts" ], "include": [ "src/**/*.d.ts" ] } tsconfig.json000066400000000000000000000012631516107111100135610ustar00rootroot00000000000000{ "compileOnSave": false, "compilerOptions": { "baseUrl": "./", "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "downlevelIteration": true, "experimentalDecorators": true, "module": "esnext", "moduleResolution": "node", "importHelpers": true, "target": "es2015", "lib": [ "es2018", "dom" ], "paths": { "angular-http-cache-interceptor": [ "release/angular-http-cache-interceptor/angular-http-cache-interceptor", "release/angular-http-cache-interceptor" ] } }, "angularCompilerOptions": { "fullTemplateTypeCheck": true, "strictInjectionParameters": true } } tsconfig.spec.json000066400000000000000000000004161516107111100145110ustar00rootroot00000000000000{ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", "types": [ "jasmine", "node" ] }, "files": [ "src/test.ts", "src/polyfills.ts" ], "include": [ "src/**/*.spec.ts", "src/**/*.d.ts" ] } tslint.json000066400000000000000000000060651516107111100132670ustar00rootroot00000000000000{ "extends": "tslint:recommended", "rules": { "align": { "options": [ "parameters", "statements" ] }, "array-type": false, "arrow-return-shorthand": true, "curly": true, "deprecation": { "severity": "warning" }, "component-class-suffix": true, "contextual-lifecycle": true, "directive-class-suffix": true, "directive-selector": [ true, "attribute", "p3x", "camelCase" ], "component-selector": [ true, "element", "p3x", "kebab-case" ], "eofline": true, "import-blacklist": [ true, "rxjs/Rx" ], "import-spacing": true, "indent": { "options": [ "spaces" ] }, "max-classes-per-file": false, "max-line-length": [ true, 140 ], "member-ordering": [ true, { "order": [ "static-field", "instance-field", "static-method", "instance-method" ] } ], "no-console": [ true, "debug", "info", "time", "timeEnd", "trace" ], "no-empty": false, "no-inferrable-types": [ true, "ignore-params" ], "no-non-null-assertion": true, "no-redundant-jsdoc": true, "no-switch-case-fall-through": true, "no-var-requires": false, "object-literal-key-quotes": [ true, "as-needed" ], "quotemark": [ true, "single" ], "semicolon": { "options": [ "always" ] }, "space-before-function-paren": { "options": { "anonymous": "never", "asyncArrow": "always", "constructor": "never", "method": "never", "named": "never" } }, "typedef-whitespace": { "options": [ { "call-signature": "nospace", "index-signature": "nospace", "parameter": "nospace", "property-declaration": "nospace", "variable-declaration": "nospace" }, { "call-signature": "onespace", "index-signature": "onespace", "parameter": "onespace", "property-declaration": "onespace", "variable-declaration": "onespace" } ] }, "variable-name": { "options": [ "ban-keywords", "check-format", "allow-pascal-case" ] }, "whitespace": { "options": [ "check-branch", "check-decl", "check-operator", "check-separator", "check-type", "check-typecast" ] }, "no-conflicting-lifecycle": true, "no-host-metadata-property": true, "no-input-rename": true, "no-inputs-metadata-property": true, "no-output-native": true, "no-output-on-prefix": true, "no-output-rename": true, "no-outputs-metadata-property": true, "template-banana-in-box": true, "template-no-negated-async": true, "use-lifecycle-interface": true, "use-pipe-transform-interface": true }, "rulesDirectory": [ "codelyzer" ] }